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) |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getGetterName(java.lang.String propertyName,
java.lang.Class type) |
int |
getModifiers() |
java.lang.String |
getName() |
abstract java.lang.Object |
getProperty(java.lang.Object object) |
static java.lang.String |
getSetterName(java.lang.String propertyName) |
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 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)