Class SObjectInspector


  • public class SObjectInspector
    extends java.lang.Object
    A convenience class for retrieving properties from objects.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Object getId​(java.lang.Object obj)
      Retrieves the id of an object.
      static java.lang.Object getProperty​(java.lang.Object obj, java.lang.String name)
      Retrieves a property from an IPropertyObject.
      static java.lang.Object getProperty​(java.lang.Object obj, java.lang.String name, java.lang.String objname)
      Retrieves a property from an IPropertyObject.
      static java.lang.Object getProperty​(java.lang.Object obj, java.lang.String name, java.lang.String objname, IValueFetcher fetcher)
      Retrieves a property from an IPropertyObject.
      static java.util.Set getPropertyNames​(java.lang.Object obj)
      Retrieves the names of all properties of an Object.
      static java.lang.Object getType​(java.lang.Object obj)
      Retrieves the type of an object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SObjectInspector

        public SObjectInspector()
    • Method Detail

      • getId

        public static java.lang.Object getId​(java.lang.Object obj)
        Retrieves the id of an object.
        Parameters:
        obj - the object being inspected
        Returns:
        the id
      • getType

        public static java.lang.Object getType​(java.lang.Object obj)
        Retrieves the type of an object.
        Parameters:
        obj - the object being inspected
        Returns:
        the type
      • getPropertyNames

        public static java.util.Set getPropertyNames​(java.lang.Object obj)
        Retrieves the names of all properties of an Object.
        Parameters:
        obj - the object being inspected
        Returns:
        the property names
      • getProperty

        public static java.lang.Object getProperty​(java.lang.Object obj,
                                                   java.lang.String name)
        Retrieves a property from an IPropertyObject.
        Parameters:
        obj - the object being inspected
        name - name of the property
        Returns:
        the property
      • getProperty

        public static java.lang.Object getProperty​(java.lang.Object obj,
                                                   java.lang.String name,
                                                   java.lang.String objname)
        Retrieves a property from an IPropertyObject.
        Parameters:
        obj - the object being inspected
        name - name of the property
        Returns:
        the property
      • getProperty

        public static java.lang.Object getProperty​(java.lang.Object obj,
                                                   java.lang.String name,
                                                   java.lang.String objname,
                                                   IValueFetcher fetcher)
        Retrieves a property from an IPropertyObject.
        Parameters:
        obj - the object being inspected
        name - name of the property
        Returns:
        the property