com.sun.xml.bind.v2.runtime.reflect
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
public class NullSafeAccessor<B,V,P>
- extends Accessor<B,V>
Accessor
wrapper that replaces a null with an empty collection.
This is so that JAX-WS property accessor will work like an ordinary getter.
Method Summary |
V |
get(B bean)
Gets the value of the property of the given bean object. |
void |
set(B bean,
V value)
Sets the value of the property of the given bean object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullSafeAccessor
public NullSafeAccessor(Accessor<B,V> core,
Lister<B,V,?,P> lister)
get
public V get(B bean)
throws AccessorException
- Description copied from class:
Accessor
- Gets the value of the property of the given bean object.
- Specified by:
get
in class Accessor<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
public void set(B bean,
V value)
throws AccessorException
- Description copied from class:
Accessor
- Sets the value of the property of the given bean object.
- Specified by:
set
in class Accessor<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.