com.sun.xml.bind.v2.runtime.reflect
Class AdaptedAccessor<BeanT,InMemValueT,OnWireValueT>
java.lang.Object
com.sun.xml.bind.v2.runtime.reflect.Accessor<BeanT,OnWireValueT>
com.sun.xml.bind.v2.runtime.reflect.AdaptedAccessor<BeanT,InMemValueT,OnWireValueT>
- All Implemented Interfaces:
- Receiver
final class AdaptedAccessor<BeanT,InMemValueT,OnWireValueT>
- extends Accessor<BeanT,OnWireValueT>
Accessor that adapts the value by using Adapter.
- See Also:
Accessor.adapt(java.lang.Class, java.lang.Class extends javax.xml.bind.annotation.adapters.XmlAdapter>)
|
Method Summary |
OnWireValueT |
get(BeanT bean)
Gets the value of the property of the given bean object. |
java.lang.Object |
getUnadapted(BeanT bean)
Sets the value without adapting the value. |
boolean |
isAdapted()
Returns true if this accessor wraps an adapter. |
void |
set(BeanT bean,
OnWireValueT o)
Sets the value of the property of the given bean object. |
void |
setUnadapted(BeanT bean,
java.lang.Object value)
Sets the value without adapting the value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdaptedAccessor
AdaptedAccessor(java.lang.Class<OnWireValueT> targetType,
Accessor<BeanT,InMemValueT> extThis,
java.lang.Class<? extends javax.xml.bind.annotation.adapters.XmlAdapter<OnWireValueT,InMemValueT>> adapter)
isAdapted
public boolean isAdapted()
- Description copied from class:
Accessor
- Returns true if this accessor wraps an adapter.
This method needs to be used with care, but it helps some optimization.
- Overrides:
isAdapted in class Accessor<BeanT,OnWireValueT>
get
public OnWireValueT get(BeanT 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<BeanT,OnWireValueT>
- 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(BeanT bean,
OnWireValueT o)
throws AccessorException
- Description copied from class:
Accessor
- Sets the value of the property of the given bean object.
- Specified by:
set in class Accessor<BeanT,OnWireValueT>
- Parameters:
bean - must not be null.o - 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.
getUnadapted
public java.lang.Object getUnadapted(BeanT bean)
throws AccessorException
- Description copied from class:
Accessor
- Sets the value without adapting the value.
This ugly entry point is only used by JAX-WS.
See
JAXBRIContext.getElementPropertyAccessor(java.lang.Class, java.lang.String, java.lang.String)
- Overrides:
getUnadapted in class Accessor<BeanT,OnWireValueT>
- Throws:
AccessorException
setUnadapted
public void setUnadapted(BeanT bean,
java.lang.Object value)
throws AccessorException
- Description copied from class:
Accessor
- Sets the value without adapting the value.
This ugly entry point is only used by JAX-WS.
See
JAXBRIContext.getElementPropertyAccessor(java.lang.Class, java.lang.String, java.lang.String)
- Overrides:
setUnadapted in class Accessor<BeanT,OnWireValueT>
- Throws:
AccessorException