|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.hivemind.util.PropertyUtils
A collection of static methods used to perform property-level access on arbitrary objects.
Method Summary | |
static void |
clearCache()
Clears all cached information. |
static PropertyAdaptor |
getPropertyAdaptor(java.lang.Object target,
java.lang.String propertyName)
Returns the PropertyAdaptor for the given target object and property name. |
static java.lang.Class |
getPropertyType(java.lang.Object target,
java.lang.String propertyName)
Returns the type of the named property. |
static java.util.List |
getReadableProperties(java.lang.Object target)
Returns an unordered List of the names of all readable properties of the target. |
static java.util.List |
getWriteableProperties(java.lang.Object target)
Returns an unordered List of the names of all writable properties of the target. |
static boolean |
isReadable(java.lang.Object target,
java.lang.String propertyName)
|
static boolean |
isWritable(java.lang.Object target,
java.lang.String propertyName)
Returns true of the instance contains a writable property of the given type. |
static java.lang.Object |
read(java.lang.Object target,
java.lang.String propertyName)
Updates the property of the target object. |
static void |
write(java.lang.Object target,
java.lang.String propertyName,
java.lang.Object value)
Updates the property of the target object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void write(java.lang.Object target, java.lang.String propertyName, java.lang.Object value)
target
- the object to updatepropertyName
- the name of the property to be updatedvalue
- the value to be stored into the target object propertypublic static boolean isWritable(java.lang.Object target, java.lang.String propertyName)
target
- the object to inspectpropertyName
- the name of the property to checkpublic static boolean isReadable(java.lang.Object target, java.lang.String propertyName)
public static java.lang.Object read(java.lang.Object target, java.lang.String propertyName)
target
- the object to updatepropertyName
- the name of a property toreadpublic static java.lang.Class getPropertyType(java.lang.Object target, java.lang.String propertyName)
target
- the object to examinepropertyName
- the name of the property to checkpublic static PropertyAdaptor getPropertyAdaptor(java.lang.Object target, java.lang.String propertyName)
PropertyAdaptor
for the given target object and property name.
ApplicationRuntimeException
- if the property does not exist.public static java.util.List getReadableProperties(java.lang.Object target)
public static java.util.List getWriteableProperties(java.lang.Object target)
public static void clearCache()
Introspector.flushCaches()
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |