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 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. |
MethodDescriptor |
getWriteMethodDescriptor()
Returns write method of this property.
|
boolean |
isFieldOnlyDescriptor()
Returns
true if this is extended property with
only field definition and without getter and setter. |
getClassDescriptor, isPublic, matchDeclaredprotected final java.lang.String name
protected final MethodDescriptor readMethodDescriptor
protected final MethodDescriptor writeMethodDescriptor
protected final FieldDescriptor fieldDescriptor
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()
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 isFieldOnlyDescriptor()
true if this is extended property with
only field definition and without getter and setter.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.Copyright © 2003-2013 Jodd Team