Class Properties
java.lang.Object
jodd.introspector.Properties
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 Summary
FieldsModifier and TypeFieldDescriptionprivate PropertyDescriptor[]protected final ClassDescriptorprotected final HashMap<String, PropertyDescriptor> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddProperty(HashMap<String, PropertyDescriptor> map, String name, MethodDescriptor methodDescriptor, boolean isSetter) Adds a setter and/or getter method to the property.protected PropertyDescriptorcreatePropertyDescriptor(String name, FieldDescriptor fieldDescriptor) Creates new field-onlyPropertyDescriptor.protected PropertyDescriptorcreatePropertyDescriptor(String name, MethodDescriptor getterMethod, MethodDescriptor setterMethod) Creates newPropertyDescriptor.Returns all property descriptors.getPropertyDescriptor(String name) Returnsproperty descriptor.protected HashMap<String, PropertyDescriptor> Inspects all properties of target type.
-
Field Details
-
classDescriptor
-
propertyDescriptors
-
allProperties
-
-
Constructor Details
-
Properties
-
-
Method Details
-
inspectProperties
Inspects all properties of target type. -
addProperty
protected void addProperty(HashMap<String, PropertyDescriptor> map, 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(String name, MethodDescriptor getterMethod, MethodDescriptor setterMethod) Creates newPropertyDescriptor. 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. -
createPropertyDescriptor
Creates new field-onlyPropertyDescriptor. It will be invoked only once. -
getPropertyDescriptor
Returnsproperty descriptor. -
getAllPropertyDescriptors
Returns all property descriptors. Properties are sorted by name.
-