public static class Accessor.GetterSetterReflection<BeanT,ValueT> extends Accessor<BeanT,ValueT>
Accessor that uses Java reflection to access a getter and a setter.Accessor.FieldReflection<BeanT,ValueT>, Accessor.GetterOnlyReflection<BeanT,ValueT>, Accessor.GetterSetterReflection<BeanT,ValueT>, Accessor.ReadOnlyFieldReflection<BeanT,ValueT>, Accessor.SetterOnlyReflection<BeanT,ValueT>| Modifier and Type | Field and Description |
|---|---|
Method |
getter |
Method |
setter |
JAXB_ELEMENT_VALUE, valueType| Constructor and Description |
|---|
GetterSetterReflection(Method getter,
Method setter) |
| Modifier and Type | Method and Description |
|---|---|
ValueT |
get(BeanT bean)
Gets the value of the property of the given bean object.
|
Accessor<BeanT,ValueT> |
optimize(JAXBContextImpl context)
Returns the optimized version of the same accessor.
|
void |
set(BeanT bean,
ValueT value)
Sets the value of the property of the given bean object.
|
adapt, adapt, getErrorInstance, getUnadapted, getValueType, isAbstractable, isAdapted, isValueTypeAbstractable, receive, setUnadaptedpublic ValueT get(BeanT bean) throws AccessorException
Accessorget in class Accessor<BeanT,ValueT>bean - must not be null.AccessorException - if failed to set a value. For example, the getter method
may throw an exception.public void set(BeanT bean, ValueT value) throws AccessorException
Accessorset in class Accessor<BeanT,ValueT>bean - must not be null.value - the value to be set. Setting value to null means resetting
to the VM default value (even for primitive properties.)AccessorException - if failed to set a value. For example, the setter method
may throw an exception.public Accessor<BeanT,ValueT> optimize(JAXBContextImpl context)
Accessoroptimize in class Accessor<BeanT,ValueT>context - The JAXBContextImpl that owns the whole thing.
(See RuntimeModelBuilder.context.)this.Copyright © 2018 JBoss by Red Hat. All rights reserved.