public interface PropertyAccessor
| Modifier and Type | Method and Description |
|---|---|
PropertyAccessor |
accessorWithConversions(ArooaConverter converter)
Provide an accessor that performs conversions.
|
BeanOverview |
getBeanOverview(Class<?> forClass)
Provide
org.oddjob.arooo.BeanOverview. |
ArooaClass |
getClassName(Object bean)
Get the
ArooaClass for a bean. |
Object |
getProperty(Object bean,
String property)
Get a property.
|
<T> T |
getProperty(Object bean,
String property,
Class<T> required)
Get a property of a required type.
|
void |
setIndexedProperty(Object bean,
String name,
int index,
Object value)
Set an indexed property on a bean.
|
void |
setMappedProperty(Object bean,
String name,
String key,
Object value)
Set a mapped property on a bean.
|
void |
setProperty(Object bean,
String expression,
Object value)
Set a property using a property expression.
|
void |
setSimpleProperty(Object bean,
String name,
Object value)
Set a property on a bean.
|
void setProperty(Object bean, String expression, Object value) throws ArooaPropertyException
bean - The bean. Must not be null.expression - The name. Must not be null.value - The value. Can be null.ArooaPropertyExceptionvoid setSimpleProperty(Object bean, String name, Object value) throws ArooaPropertyException
bean - The bean. Must not be null.name - The name. Must not be null.value - The value. Can be null.ArooaPropertyExceptionvoid setMappedProperty(Object bean, String name, String key, Object value) throws ArooaPropertyException
bean - The bean. Must not be null.name - The name. Must not be null.key - The mapped property's key. Must not be null.value - The value. Can be null.ArooaPropertyExceptionvoid setIndexedProperty(Object bean, String name, int index, Object value) throws ArooaPropertyException
bean - The bean. Must not be null.name - The name. Must not be null.index - The indexed property's index. 0 based.value - The value. Can be null.ArooaPropertyExceptionArooaClass getClassName(Object bean)
ArooaClass for a bean.bean - BeanOverview getBeanOverview(Class<?> forClass) throws ArooaException
org.oddjob.arooo.BeanOverview. Note that this
will provide the overview for the Java class. If using a bean
that might be a dynabean then use
getArooaClass(bean).getBeanOverview() instead.forClassCl - ArooaExceptionObject getProperty(Object bean, String property) throws ArooaPropertyException
bean - The bean.The - property.ArooaPropertyException<T> T getProperty(Object bean, String property, Class<T> required) throws ArooaPropertyException, ArooaConversionException
bean - The bean.The - property.ArooaPropertyExceptionArooaConversionExceptionPropertyAccessor accessorWithConversions(ArooaConverter converter)
converter - The converter.Copyright © 2023. All rights reserved.