|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.acsinet_solutions.util.ReflectionWrapper
public final class ReflectionWrapper
Reflection Wrapper base class. Useful to avoid playing with reflection in common situations.
| Method Summary | |
|---|---|
void |
addValue(java.lang.Object bean,
java.lang.String property,
java.lang.Object value)
Add the value for the given property in the given bean |
java.lang.Class |
getAdditionPropertyType(java.lang.String property)
Get the addition property type |
java.lang.Object |
getIndexedValue(java.lang.Object bean,
java.lang.String property,
int pos)
Get the indexed value for the given property in the given bean |
java.util.Set<java.lang.String> |
getReadOnlyPropertyNames()
Get a list of the read only property names of the current class |
java.lang.Class |
getReadPropertyType(java.lang.String property)
Get the read property type |
java.util.Set<java.lang.String> |
getReadWritePropertyNames()
Get a list of the read/write property names of the current class |
java.lang.Object |
getValue(java.lang.Object bean,
java.lang.String property)
Get the value for the given property in the given bean |
static ReflectionWrapper |
getWrapper(java.lang.Class c)
ReflectionWrapper factory method |
static ReflectionWrapper |
getWrapperFor(java.lang.Object obj)
ReflectionWrapper factory method; Get a wrapper for the class implemented by the given object instance |
boolean |
hasAdditionProperty(java.lang.String name)
Check if the current class has the given addition methods |
boolean |
hasIndexedReadProperty(java.lang.String name)
Check if the current class has the given indexed read property |
boolean |
hasReadProperty(java.lang.String name)
Check if the current class has the given read property |
boolean |
hasReadWriteProperty(java.lang.String name)
Check if the current class has both read and write properties for the given name |
boolean |
hasWriteProperty(java.lang.String name)
Check if the current class has the given write property |
void |
removeValue(java.lang.Object bean,
java.lang.String property,
java.lang.Object value)
Remove the value for the given property in the given bean |
void |
setValue(java.lang.Object bean,
java.lang.String property,
java.lang.Object value)
Set the value for the given property in the given bean |
void |
setValueByType(java.lang.Object bean,
java.lang.Class propertyType,
java.lang.Object value)
Method wire. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final ReflectionWrapper getWrapper(java.lang.Class c)
c - A not-null Class instance
public static final ReflectionWrapper getWrapperFor(java.lang.Object obj)
obj - A not-null Object instance
public final java.util.Set<java.lang.String> getReadWritePropertyNames()
public final java.util.Set<java.lang.String> getReadOnlyPropertyNames()
public final boolean hasReadProperty(java.lang.String name)
name - A not-null String instance
public final java.lang.Class getReadPropertyType(java.lang.String property)
property - The not-null not-empty Property name
public final boolean hasWriteProperty(java.lang.String name)
name - A not-null String instance
public final boolean hasReadWriteProperty(java.lang.String name)
name - A not-null String instance
public final boolean hasIndexedReadProperty(java.lang.String name)
name - A not-null String instance
public final boolean hasAdditionProperty(java.lang.String name)
name - A not-null String instance
public final java.lang.Class getAdditionPropertyType(java.lang.String property)
property - The not-null not-empty Property name
public final java.lang.Object getValue(java.lang.Object bean,
java.lang.String property)
bean - A not-null Object instanceproperty - A not-null String instance
public final java.lang.Object getIndexedValue(java.lang.Object bean,
java.lang.String property,
int pos)
bean - A not-null Object instanceproperty - A not-null String instance
public final void setValue(java.lang.Object bean,
java.lang.String property,
java.lang.Object value)
bean - A not-null Object instanceproperty - A not-null String instancevalue - A maybe-null property to set
public final void addValue(java.lang.Object bean,
java.lang.String property,
java.lang.Object value)
bean - A not-null Object instanceproperty - A not-null String instancevalue - A maybe-null property to set
public final void removeValue(java.lang.Object bean,
java.lang.String property,
java.lang.Object value)
bean - A not-null Object instanceproperty - A not-null String instancevalue - A maybe-null property to set
public void setValueByType(java.lang.Object bean,
java.lang.Class propertyType,
java.lang.Object value)
propertyType - source -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||