|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omnaest.utils.beans.result.BeanPropertyAccessor<B>
B - Java Bean typepublic class BeanPropertyAccessor<B>
Java Bean property access object for Methods and Field of a special Java Bean type.
| Field Summary | |
|---|---|
protected Class<B> |
beanClass
|
protected Field |
field
|
protected Method |
methodGetter
|
protected Method |
methodSetter
|
protected String |
propertyName
|
| Constructor Summary | |
|---|---|
BeanPropertyAccessor(Field field,
Method methodGetter,
Method methodSetter,
String propertyName,
Class<B> beanClass)
|
|
| Method Summary | ||
|---|---|---|
boolean |
copyPropertyValue(B beanSource,
B beanDestination)
Copies the value of one Java Bean for the underlying Java Bean property of this BeanPropertyAccessor to another Java
Bean. |
|
Class<?> |
determinePropertyType()
Determines the Class type for the property. |
|
Class<?> |
getBeanClass()
|
|
Field |
getField()
|
|
protected Method |
getMethod()
|
|
Method |
getMethodGetter()
|
|
Method |
getMethodSetter()
|
|
String |
getPropertyName()
|
|
Object |
getPropertyValue(B bean)
Returns the property value for the underlying Java Bean property from the given Java Bean object. |
|
boolean |
hasGetter()
Returns true, if the method has no parameters but a return type. |
|
boolean |
hasGetterAndSetter()
Returns true, if the underlying Field has a getter and a setter method. |
|
boolean |
hasGetterOrSetter()
Returns true, if the underlying Field has at least a getter or a setter method or both available. |
|
boolean |
hasSetter()
Is true, if a method has only one parameter and begins with "set". |
|
static
|
merge(BeanPropertyAccessor<B> beanPropertyAccessorA,
BeanPropertyAccessor<B> beanPropertyAccessorB)
Merges two BeanPropertyAccessor instances into one if the underlying Class and property are equal. |
|
boolean |
setPropertyValue(B bean,
Object value)
Sets the property value for the underlying Java Bean property for the given Java Bean object. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String propertyName
protected Field field
protected Method methodGetter
protected Method methodSetter
protected Class<B> beanClass
| Constructor Detail |
|---|
public BeanPropertyAccessor(Field field,
Method methodGetter,
Method methodSetter,
String propertyName,
Class<B> beanClass)
| Method Detail |
|---|
public boolean copyPropertyValue(B beanSource,
B beanDestination)
BeanPropertyAccessor to another Java
Bean.
beanSource - beanDestination -
public Class<?> determinePropertyType()
Class type for the property.
public Object getPropertyValue(B bean)
bean -
public boolean setPropertyValue(B bean,
Object value)
bean - value -
public boolean hasGetterOrSetter()
Field has at least a getter or a setter method or both available.
public boolean hasGetterAndSetter()
Field has a getter and a setter method.
public boolean hasGetter()
public boolean hasSetter()
public static <B> BeanPropertyAccessor<B> merge(BeanPropertyAccessor<B> beanPropertyAccessorA,
BeanPropertyAccessor<B> beanPropertyAccessorB)
BeanPropertyAccessor instances into one if the underlying Class and property are equal.
B - beanPropertyAccessorA - beanPropertyAccessorB -
protected Method getMethod()
public Class<?> getBeanClass()
public String getPropertyName()
public Field getField()
public Method getMethodGetter()
public Method getMethodSetter()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||