|
|||||||||
| Home >> All >> org >> apache >> hivemind >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.hivemind.util
Class PropertyUtils

java.lang.Objectorg.apache.hivemind.util.PropertyUtils
- public class PropertyUtils
- extends java.lang.Object
A collection of static methods used to perform property-level access on arbitrary objects.
| Field Summary | |
private static java.util.Map |
_classAdaptors
|
| Constructor Summary | |
private |
PropertyUtils()
|
| Method Summary | |
private static ClassAdaptor |
buildClassAdaptor(java.lang.Object target,
java.lang.Class targetClass)
|
static void |
clearCache()
Clears all cached information. |
static void |
configureProperties(java.lang.Object target,
java.lang.String initializer)
Initializes the properties of an object from a string. |
private static ClassAdaptor |
getAdaptor(java.lang.Object target)
|
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 |
smartWrite(java.lang.Object target,
java.lang.String propertyName,
java.lang.String value)
An improved version of write(Object, String, Object) 55 where the value starts as a
string and is converted to the correct property type before being assigned. |
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 |
| Field Detail |
_classAdaptors
private static final java.util.Map _classAdaptors
| Constructor Detail |
PropertyUtils
private PropertyUtils()
| Method Detail |
write
public static void write(java.lang.Object target, java.lang.String propertyName, java.lang.Object value)
- Updates the property of the target object.
smartWrite
public static void smartWrite(java.lang.Object target, java.lang.String propertyName, java.lang.String value)
- An improved version of
write(Object, String, Object)55 where the value starts as a string and is converted to the correct property type before being assigned.- Since:
- 1.1
configureProperties
public static void configureProperties(java.lang.Object target, java.lang.String initializer)
- Initializes the properties of an object from a string. The string is a comma-seperated
sequence of property names and values. Property names are seperated from values be an equals
sign. Spaces before and after the property names are trimmed.
For boolean properties, the equals sign and value may be omitted (a value of true is
assumed), or the property name may be prefixed with an exclamation point to indicated false
value. Example:
validate,maxLength=10,displayName=User Id.- Since:
- 1.1
isWritable
public static boolean isWritable(java.lang.Object target, java.lang.String propertyName)
- Returns true of the instance contains a writable property of the given type.
isReadable
public static boolean isReadable(java.lang.Object target, java.lang.String propertyName)
read
public static java.lang.Object read(java.lang.Object target, java.lang.String propertyName)
- Updates the property of the target object.
getPropertyType
public static java.lang.Class getPropertyType(java.lang.Object target, java.lang.String propertyName)
- Returns the type of the named property.
getPropertyAdaptor
public static PropertyAdaptor getPropertyAdaptor(java.lang.Object target, java.lang.String propertyName)
- Returns the PropertyAdaptor for the given target object and property name.
getReadableProperties
public static java.util.List getReadableProperties(java.lang.Object target)
- Returns an unordered List of the names of all readable properties of the target.
getWriteableProperties
public static java.util.List getWriteableProperties(java.lang.Object target)
- Returns an unordered List of the names of all writable properties of the target.
getAdaptor
private static ClassAdaptor getAdaptor(java.lang.Object target)
buildClassAdaptor
private static ClassAdaptor buildClassAdaptor(java.lang.Object target, java.lang.Class targetClass)
clearCache
public static void clearCache()
- Clears all cached information. Invokes Introspector.flushCaches()>
Introspector.flushCaches()55 .
|
|||||||||
| Home >> All >> org >> apache >> hivemind >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.hivemind.util.PropertyUtils