|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cojen.util.BeanPropertyAccessor<B>
public abstract class BeanPropertyAccessor<B>
Provides a simple and efficient means of reading and writing bean properties. BeanPropertyAccessor auto-generates code, eliminating the need to invoke methods via reflection. Bean access methods are bound-to directly, using a special hash/switch design pattern.
BeanPropertyMapFactory| Constructor Summary | |
|---|---|
protected |
BeanPropertyAccessor()
|
| Method Summary | ||
|---|---|---|
static
|
forClass(Class<B> clazz)
Returns a new or cached BeanPropertyAccessor for the given class. |
|
abstract Object |
getPropertyValue(B bean,
String property)
|
|
abstract boolean |
hasPropertyValue(B bean,
Object value)
Returns true if at least one property is set to the given value. |
|
abstract boolean |
hasReadableProperty(String property)
Returns true if readable bean property exists. |
|
abstract boolean |
hasWritableProperty(String property)
Returns true if writable bean property exists. |
|
abstract void |
setPropertyValue(B bean,
String property,
Object value)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected BeanPropertyAccessor()
| Method Detail |
|---|
public static <B> BeanPropertyAccessor<B> forClass(Class<B> clazz)
public abstract Object getPropertyValue(B bean,
String property)
throws NoSuchPropertyException
NoSuchPropertyException
public abstract void setPropertyValue(B bean,
String property,
Object value)
throws NoSuchPropertyException
NoSuchPropertyExceptionpublic abstract boolean hasReadableProperty(String property)
public abstract boolean hasWritableProperty(String property)
public abstract boolean hasPropertyValue(B bean,
Object value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||