|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcorelib.runtime.reflexion.Property
public class Property
This class extends the possibility of the Java reflection framework, in simplifying the property management. The getter and setter methods are searched recursively into all inherited super classes.
| Constructor Summary | |
|---|---|
Property(java.lang.Class<?> classMetaData,
java.lang.String propertyName)
Class constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
get(java.lang.Object instance)
Returns the property value for the specified instance. |
java.lang.String |
getPropertyName()
Returns the name of the considered property. |
java.lang.reflect.Method |
getReadMethod()
Returns the getter method metadata's. |
java.lang.reflect.Method |
getWriteMethod()
Returns the getter method metadata's. |
boolean |
isAccessible()
Returns if this property is considered as accessible. |
void |
set(java.lang.Object instance,
java.lang.Object value)
Changes the property value for the specified instance. |
void |
setAccessible(boolean state)
Sets this property as accessible. |
java.lang.String |
toString()
Computes the representation string of this instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Property(java.lang.Class<?> classMetaData,
java.lang.String propertyName)
classMetaData - The metaclass of the type that contains getter and setter methods.propertyName - The name of the considered property.| Method Detail |
|---|
public java.lang.String getPropertyName()
public boolean isAccessible()
public void setAccessible(boolean state)
state - The accessible state.
public java.lang.reflect.Method getReadMethod()
throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException - Thrown if no getter method was found.
public java.lang.reflect.Method getWriteMethod()
throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException - Thrown if no setter method was found.
public java.lang.Object get(java.lang.Object instance)
throws java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.NoSuchMethodException
instance - The instance used for retreive the property value.
java.lang.IllegalAccessException - Thrown if the property getter is not accessible.
java.lang.reflect.InvocationTargetException - Thrown if an error appears during the property invocation.
java.lang.NoSuchMethodException - Thrown if the getter method does not exists.
public void set(java.lang.Object instance,
java.lang.Object value)
throws java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.NoSuchMethodException
instance - The instance used for change the property value.value - The new value of the property.
java.lang.IllegalAccessException - Thrown if the property setter is not accessible.
java.lang.reflect.InvocationTargetException - Thrown if an error appears during the property invocation.
java.lang.NoSuchMethodException - Thrown if the setter method does not exists.public java.lang.String toString()
toString in class java.lang.Object
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||