NatureExtendable
, PropertyHolder
public class FieldInfo extends java.lang.Object implements PropertyHolder
Constructor | Description |
---|---|
FieldInfo(ClassInfo declaringClassInfo,
java.lang.Class<?> fieldType,
java.lang.String fieldName,
java.lang.reflect.Method getterMethod,
java.lang.reflect.Method setterMethod) |
Creates a FieldInfo associated to the given
ClassInfo , describing
the given a field with the given name using method (property) access. |
Modifier and Type | Method | Description |
---|---|---|
void |
addNature(java.lang.String nature) |
Adds a specified nature.
|
ClassInfo |
getDeclaringClassInfo() |
|
java.lang.String |
getFieldName() |
Indicates the name of the field described by this
FieldInfo . |
java.lang.Class<?> |
getFieldType() |
Indicates the type of the field described by this
FieldInfo . |
java.lang.reflect.Method |
getGetterMethod() |
Indicates the getter access method of the field.
|
java.lang.Object |
getProperty(java.lang.String name) |
Get a property by its name.
|
java.lang.reflect.Method |
getSetterMethod() |
Indicates the setter access method of the field.
|
boolean |
hasNature(java.lang.String nature) |
Checks if a specified nature has been added.
|
void |
setDeclaringClassInfo(ClassInfo classInfo) |
|
void |
setFieldName(java.lang.String fieldName) |
Sets the name of the field described by this
FieldInfo . |
void |
setFieldType(java.lang.Class<?> fieldType) |
Sets the type of the field described by this
FieldInfo . |
void |
setGetterMethod(java.lang.reflect.Method getterMethod) |
Sets the getter access method of the field.
|
void |
setProperty(java.lang.String name,
java.lang.Object value) |
Set a property specified by the name to the passed value.
|
void |
setSetterMethod(java.lang.reflect.Method setterMethod) |
Sets the setter access method of the field.
|
public FieldInfo(ClassInfo declaringClassInfo, java.lang.Class<?> fieldType, java.lang.String fieldName, java.lang.reflect.Method getterMethod, java.lang.reflect.Method setterMethod)
ClassInfo
, describing
the given a field with the given name using method (property) access.declaringClassInfo
- The ClassInfo this FieldInfo is associated with.fieldType
- The type of the described field.fieldName
- The name of the described field.getterMethod
- The reference to the getter method of the Field.setterMethod
- The reference to the setter method of the Field.public void addNature(java.lang.String nature)
addNature
in interface NatureExtendable
nature
- the name of the natureNatureExtendable.addNature(java.lang.String)
public boolean hasNature(java.lang.String nature)
hasNature
in interface NatureExtendable
nature
- the name of the nature.NatureExtendable.hasNature(java.lang.String)
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface PropertyHolder
name
- the name of the property to get.PropertyHolder.getProperty(java.lang.String)
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface PropertyHolder
name
- the name of the property to set.value
- the value to set the specified property to.PropertyHolder.setProperty(java.lang.String,
java.lang.Object)
public ClassInfo getDeclaringClassInfo()
public void setDeclaringClassInfo(ClassInfo classInfo)
classInfo
- The ClassInfo this FieldInfo is associated with.public java.lang.String getFieldName()
FieldInfo
.FieldInfo
.public void setFieldName(java.lang.String fieldName)
FieldInfo
.fieldName
- set the name of the field described by this FieldInfo
.public java.lang.Class<?> getFieldType()
FieldInfo
.public void setFieldType(java.lang.Class<?> fieldType)
FieldInfo
.fieldType
- The Type of the field.public java.lang.reflect.Method getGetterMethod()
public void setGetterMethod(java.lang.reflect.Method getterMethod)
getterMethod
- the getter method reference.public java.lang.reflect.Method getSetterMethod()
public void setSetterMethod(java.lang.reflect.Method setterMethod)
setterMethod
- the setter method reference.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com