Class NullSafeAccessor<B,V,P>
java.lang.Object
com.sun.xml.bind.v2.runtime.reflect.Accessor<B,V>
com.sun.xml.bind.v2.runtime.reflect.NullSafeAccessor<B,V,P>
- All Implemented Interfaces:
Receiver
Accessor
wrapper that replaces a null with an empty collection.
This is so that JAX-WS property accessor will work like an ordinary getter.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.xml.bind.v2.runtime.reflect.Accessor
Accessor.FieldReflection<BeanT,
ValueT>, Accessor.GetterOnlyReflection<BeanT, ValueT>, Accessor.GetterSetterReflection<BeanT, ValueT>, Accessor.ReadOnlyFieldReflection<BeanT, ValueT>, Accessor.SetterOnlyReflection<BeanT, ValueT> -
Field Summary
Fields inherited from class com.sun.xml.bind.v2.runtime.reflect.Accessor
JAXB_ELEMENT_VALUE, valueType
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.sun.xml.bind.v2.runtime.reflect.Accessor
adapt, adapt, getErrorInstance, getUnadapted, getValueType, isAbstractable, isAdapted, isValueTypeAbstractable, optimize, receive, setUnadapted
-
Constructor Details
-
NullSafeAccessor
-
-
Method Details
-
get
Description copied from class:Accessor
Gets the value of the property of the given bean object.- Specified by:
get
in classAccessor<B,
V> - Parameters:
bean
- must not be null.- Throws:
AccessorException
- if failed to set a value. For example, the getter method may throw an exception.
-
set
Description copied from class:Accessor
Sets the value of the property of the given bean object.- Specified by:
set
in classAccessor<B,
V> - Parameters:
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.)- Throws:
AccessorException
- if failed to set a value. For example, the setter method may throw an exception.
-