Class Utils2

java.lang.Object
org.apache.juneau.common.utils.Utils
org.apache.juneau.internal.Utils2

public class Utils2 extends Utils
Various generic object utility methods.
See Also:
  • Constructor Details

  • Method Details

    • unwrap

      public static Object unwrap(Object o)
      If the specified object is a Supplier or Value, returns the inner value, otherwise the same value.
      Parameters:
      o - The object to unwrap.
      Returns:
      The unwrapped object.
    • identity

      public static String identity(Object o)
      Converts the specified object into an identifiable string of the form "Class[identityHashCode]"
      Parameters:
      o - The object to convert to a string.
      Returns:
      An identity string.
    • toPropertyMap

      public static JsonMap toPropertyMap(Object o)
      Searches for all properties() methods on the specified object and creates a combine map of them.
      Parameters:
      o - The object to return a property map of.
      Returns:
      A new property map.