| java.lang.Object com.sun.xml.bind.v2.runtime.reflect.Accessor
All known Subclasses: com.sun.xml.bind.v2.runtime.reflect.opt.FieldAccessor_Boolean, com.sun.xml.bind.v2.runtime.reflect.opt.MethodAccessor_Integer, com.sun.xml.bind.v2.runtime.reflect.opt.FieldAccessor_Character, com.sun.xml.bind.v2.runtime.reflect.opt.MethodAccessor_Boolean, com.sun.xml.bind.v2.runtime.reflect.opt.MethodAccessor_Byte, com.sun.xml.bind.v2.runtime.reflect.opt.FieldAccessor_Float, com.sun.xml.bind.v2.runtime.reflect.opt.MethodAccessor_Short, com.sun.xml.bind.v2.runtime.reflect.opt.MethodAccessor_Ref, com.sun.xml.bind.v2.runtime.reflect.opt.FieldAccessor_Short, com.sun.xml.bind.v2.runtime.reflect.opt.FieldAccessor_Byte, com.sun.xml.bind.v2.runtime.reflect.opt.FieldAccessor_Ref, com.sun.xml.bind.v2.runtime.reflect.opt.MethodAccessor_Double, com.sun.xml.bind.v2.runtime.reflect.opt.FieldAccessor_Long, com.sun.xml.bind.v2.runtime.reflect.opt.FieldAccessor_Integer, com.sun.xml.bind.v2.runtime.reflect.opt.FieldAccessor_Double, com.sun.xml.bind.v2.runtime.reflect.opt.MethodAccessor_Character, com.sun.xml.bind.v2.runtime.reflect.opt.MethodAccessor_Long, com.sun.xml.bind.v2.runtime.reflect.opt.MethodAccessor_Float,
Accessor | abstract public class Accessor implements Receiver(Code) | | Accesses a particular property of a bean.
This interface encapsulates the access to the actual data store.
The intention is to generate implementations for a particular bean
and a property to improve the performance.
Accessor can be used as a receiver. Upon receiving an object
it sets that to the field.
See Also: Accessor.FieldReflection See Also: TransducedAccessor author: Kohsuke Kawaguchi (kk@kohsuke.org) |
Inner Class :public static class FieldReflection extends Accessor | |
Inner Class :final public static class ReadOnlyFieldReflection extends FieldReflection | |
Inner Class :public static class GetterSetterReflection extends Accessor | |
Inner Class :public static class GetterOnlyReflection extends GetterSetterReflection | |
Inner Class :public static class SetterOnlyReflection extends GetterSetterReflection | |
Method Summary | |
final public Accessor<BeanT, T> | adapt(Class<T> targetType, Class<? extends XmlAdapter<T, ValueT>> adapter) Wraps this
Accessor into another
Accessor and performs the type adaption as necessary. | final public Accessor<BeanT, T> | adapt(Adapter<Type, Class> adapter) | abstract public ValueT | get(BeanT bean) Gets the value of the property of the given bean object.
Parameters: bean - must not be null. throws: AccessorException - if failed to set a value. | public static Accessor<A, B> | getErrorInstance() Gets the special
Accessor used to recover from errors. | public Object | getUnadapted(BeanT bean) Sets the value without adapting the value. | public Class<ValueT> | getValueType() | public boolean | isAdapted() Returns true if this accessor wraps an adapter. | public Accessor<BeanT, ValueT> | optimize(JAXBContextImpl context) Returns the optimized version of the same accessor. | public void | receive(UnmarshallingContext.State state, Object o) | abstract public void | set(BeanT bean, ValueT value) Sets the value of the property of the given bean object.
Parameters: bean - must not be null. Parameters: value - the value to be set. | public void | setUnadapted(BeanT bean, Object value) Sets the value without adapting the value. |
Accessor | protected Accessor(Class<ValueT> valueType)(Code) | | |
get | abstract public ValueT get(BeanT bean) throws AccessorException(Code) | | Gets the value of the property of the given bean object.
Parameters: bean - must not be null. throws: AccessorException - if failed to set a value. For example, the getter methodmay throw an exception. since: 2.0 EA1 |
getErrorInstance | public static Accessor<A, B> getErrorInstance()(Code) | | Gets the special
Accessor used to recover from errors.
|
isAdapted | public boolean isAdapted()(Code) | | Returns true if this accessor wraps an adapter.
This method needs to be used with care, but it helps some optimization.
|
set | abstract public void set(BeanT bean, ValueT value) throws AccessorException(Code) | | Sets the value of the property of the given bean object.
Parameters: bean - must not be null. Parameters: value - the value to be set. Setting value to null means resettingto the VM default value (even for primitive properties.) throws: AccessorException - if failed to set a value. For example, the setter methodmay throw an exception. since: 2.0 EA1 |
|
|