Class Properties


  • public class Properties
    extends java.lang.Object
    Bean properties collection. Property in Java is defined as a pair of read and write method. In Jodd, property can be extended with field definition. Moreover, properties will include just single fields. This behavior can be controlled via ClassDescriptor.
    • Field Detail

      • propertyDescriptors

        protected final java.util.HashMap<java.lang.String,​PropertyDescriptor> propertyDescriptors
    • Constructor Detail

    • Method Detail

      • inspectProperties

        protected java.util.HashMap<java.lang.String,​PropertyDescriptor> inspectProperties()
        Inspects all properties of target type.
      • addProperty

        protected void addProperty​(java.util.HashMap<java.lang.String,​PropertyDescriptor> map,
                                   java.lang.String name,
                                   MethodDescriptor methodDescriptor,
                                   boolean isSetter)
        Adds a setter and/or getter method to the property. If property is already defined, the new, updated, definition will be created.
      • createPropertyDescriptor

        protected PropertyDescriptor createPropertyDescriptor​(java.lang.String name,
                                                              MethodDescriptor getterMethod,
                                                              MethodDescriptor setterMethod)
        Creates new PropertyDescriptor. Note that this method may be called up to three times (depends on use case) for the same property. Each time when a property is updated, a new definition is created with updated information.
      • getAllPropertyDescriptors

        public PropertyDescriptor[] getAllPropertyDescriptors()
        Returns all property descriptors. Properties are sorted by name.