public abstract class MetaProperty
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name |
static java.lang.String |
PROPERTY_SET_PREFIX |
protected java.lang.Class |
type |
Constructor and Description |
---|
MetaProperty(java.lang.String name,
java.lang.Class type)
Constructor that sets the property name and type (class)
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getGetterName(java.lang.String propertyName,
java.lang.Class type)
Gets the name for the getter for this property
|
int |
getModifiers()
Returns the access modifier.
|
java.lang.String |
getName()
Return the name of the property
|
abstract java.lang.Object |
getProperty(java.lang.Object object) |
static java.lang.String |
getSetterName(java.lang.String propertyName)
Gets the setter for the getter for this property.
|
java.lang.Class |
getType() |
abstract void |
setProperty(java.lang.Object object,
java.lang.Object newValue)
Sets the property on the given object to the new value
|
protected final java.lang.String name
protected java.lang.Class type
public static final java.lang.String PROPERTY_SET_PREFIX
public MetaProperty(java.lang.String name, java.lang.Class type)
public abstract java.lang.Object getProperty(java.lang.Object object)
java.lang.Exception
- if the property could not be evaluatedpublic abstract void setProperty(java.lang.Object object, java.lang.Object newValue)
object
- on which to set the propertynewValue
- the new value of the propertyjava.lang.RuntimeException
- if the property could not be setpublic java.lang.String getName()
public java.lang.Class getType()
public int getModifiers()
public static java.lang.String getGetterName(java.lang.String propertyName, java.lang.Class type)
public static java.lang.String getSetterName(java.lang.String propertyName)