Class PropertyDescriptor

java.lang.Object
jodd.introspector.Descriptor
jodd.introspector.PropertyDescriptor

public class PropertyDescriptor extends Descriptor
Property descriptor. It consist of read, write and field descriptor. Only one of those three descriptors may exist.
  • Field Details

    • name

      protected final String name
    • readMethodDescriptor

      protected final MethodDescriptor readMethodDescriptor
    • writeMethodDescriptor

      protected final MethodDescriptor writeMethodDescriptor
    • fieldDescriptor

      protected final FieldDescriptor fieldDescriptor
    • type

      protected Class type
    • getters

      protected Getter[] getters
    • setters

      protected Setter[] setters
  • Constructor Details

  • Method Details

    • findField

      protected FieldDescriptor findField(String fieldName)
      Locates property field. Field is being searched also in all superclasses of current class.
    • getName

      public String getName()
      Returns property name.
      Specified by:
      getName in class Descriptor
    • getReadMethodDescriptor

      public MethodDescriptor getReadMethodDescriptor()
      Returns read method of this property. May be null if read method is not defined.
    • getWriteMethodDescriptor

      public MethodDescriptor getWriteMethodDescriptor()
      Returns write method of this property. May be null for read-only properties.
    • getFieldDescriptor

      public FieldDescriptor getFieldDescriptor()
      Returns the associated field of this property. May be null if properties are not enhanced by field description.
    • isFieldOnly

      public boolean isFieldOnly()
      Returns true if this is an extended property with only field definition and without getter and setter.
    • isGetterOnly

      public boolean isGetterOnly()
      Returns true if this property has only a getter method.
    • isSetterOnly

      public boolean isSetterOnly()
      Returns true if this property has only a setter method.
    • getType

      public Class getType()
      Returns property type. Raw types are detected.
    • getGetter

      public Getter getGetter(boolean declared)
      Returns Getter. May return null if no matched getter is found.
    • createGetter

      protected Getter createGetter(boolean declared)
      Creates a Getter.
    • getSetter

      public Setter getSetter(boolean declared)
      Returns Setter. May return null if no matched setter is found.
    • createSetter

      protected Setter createSetter(boolean declared)
      Creates a Setter.
    • resolveKeyType

      public Class resolveKeyType(boolean declared)
      Resolves key type for given property descriptor.
    • resolveComponentType

      public Class resolveComponentType(boolean declared)
      Resolves component type for given property descriptor.