Class PropertyReader


  • public class PropertyReader
    extends Object
    This class can read the value of a property from a JavaBeans-like object. A property may be accessed by a public field or getter and setter methods.
    See Also:
    PropertyScanner
    • Constructor Detail

      • PropertyReader

        public PropertyReader()
    • Method Detail

      • readProperty

        public static Object readProperty​(Object obj,
                                          String property)
        Reads the value of the specified property.
        Parameters:
        obj - the object
        property - the property name
        Returns:
        the property value
      • readProperty

        public static Object readProperty​(Object obj,
                                          PropertySpec propSpec)
        Reads the value of the specified property.
        Parameters:
        obj - the object
        propSpec - the property specification
        Returns:
        the property value