Package org.cyclos.impl.utils
Class BeanAccessor
- java.lang.Object
-
- org.cyclos.impl.utils.BeanAccessor
-
- Direct Known Subclasses:
BeanFormatter
public class BeanAccessor extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringCUSTOM_FIELDstatic BeanAccessorINSTANCEstatic StringSELF
-
Constructor Summary
Constructors Modifier Constructor Description protectedBeanAccessor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tget(Object bean, String property)Gets the given property from the given bean.static BeanAccessorinstance()voidset(Object bean, String property, Object value)Sets a given property value on the given bean.
-
-
-
Field Detail
-
SELF
public static final String SELF
- See Also:
- Constant Field Values
-
CUSTOM_FIELD
public static final String CUSTOM_FIELD
- See Also:
- Constant Field Values
-
INSTANCE
public static final BeanAccessor INSTANCE
-
-
Method Detail
-
instance
public static final BeanAccessor instance()
-
get
public <T> T get(Object bean, String property)
Gets the given property from the given bean. When the property name is equals toSELF, returns the bean itself. It can also use theCUSTOM_FIELDprefix, concatenated with the field id to access custom field values
-
-