public class PropertyDescriptor extends Descriptor
Modifier and Type | Field and Description |
---|---|
protected FieldDescriptor |
fieldDescriptor |
protected Getter[] |
getters |
protected java.lang.String |
name |
protected MethodDescriptor |
readMethodDescriptor |
protected Setter[] |
setters |
protected java.lang.Class |
type |
protected MethodDescriptor |
writeMethodDescriptor |
classDescriptor, isPublic
Constructor and Description |
---|
PropertyDescriptor(ClassDescriptor classDescriptor,
java.lang.String propertyName,
FieldDescriptor fieldDescriptor)
Creates field-only property descriptor.
|
PropertyDescriptor(ClassDescriptor classDescriptor,
java.lang.String propertyName,
MethodDescriptor readMethod,
MethodDescriptor writeMethod)
Creates property descriptor.
|
Modifier and Type | Method and Description |
---|---|
protected Getter |
createGetter(boolean declared)
Creates a
Getter . |
protected Setter |
createSetter(boolean declared)
Creates a
Setter . |
protected FieldDescriptor |
findField(java.lang.String fieldName)
Locates property field.
|
FieldDescriptor |
getFieldDescriptor()
Returns the associated field of this property.
|
Getter |
getGetter(boolean declared)
Returns
Getter . |
java.lang.String |
getName()
Returns property name.
|
MethodDescriptor |
getReadMethodDescriptor()
Returns read method of this property.
|
Setter |
getSetter(boolean declared)
Returns
Setter . |
java.lang.Class |
getType()
Returns property type.
|
MethodDescriptor |
getWriteMethodDescriptor()
Returns write method of this property.
|
boolean |
isFieldOnly()
Returns
true if this is an extended property with
only field definition and without getter and setter. |
boolean |
isGetterOnly()
Returns
true if this property has only a getter method. |
boolean |
isSetterOnly()
Returns
true if this property has only a setter method. |
java.lang.Class |
resolveComponentType(boolean declared)
Resolves component type for given property descriptor.
|
java.lang.Class |
resolveKeyType(boolean declared)
Resolves key type for given property descriptor.
|
getClassDescriptor, isPublic, matchDeclared
protected final java.lang.String name
protected final MethodDescriptor readMethodDescriptor
protected final MethodDescriptor writeMethodDescriptor
protected final FieldDescriptor fieldDescriptor
protected java.lang.Class type
protected Getter[] getters
protected Setter[] setters
public PropertyDescriptor(ClassDescriptor classDescriptor, java.lang.String propertyName, FieldDescriptor fieldDescriptor)
public PropertyDescriptor(ClassDescriptor classDescriptor, java.lang.String propertyName, MethodDescriptor readMethod, MethodDescriptor writeMethod)
protected FieldDescriptor findField(java.lang.String fieldName)
public java.lang.String getName()
getName
in class Descriptor
public MethodDescriptor getReadMethodDescriptor()
null
if read method is not defined.public MethodDescriptor getWriteMethodDescriptor()
null
for read-only properties.public FieldDescriptor getFieldDescriptor()
null
if properties are not enhanced by field description.public boolean isFieldOnly()
true
if this is an extended property with
only field definition and without getter and setter.public boolean isGetterOnly()
true
if this property has only a getter method.public boolean isSetterOnly()
true
if this property has only a setter method.public java.lang.Class getType()
public Getter getGetter(boolean declared)
Getter
. May return null
if no matched getter is found.public Setter getSetter(boolean declared)
Setter
. May return null
if no matched setter is found.public java.lang.Class resolveKeyType(boolean declared)
public java.lang.Class resolveComponentType(boolean declared)
Copyright © 2003-present Jodd Team