Top Description Fields Constructors Methods
org.glassfish.jaxb.runtime.v2.runtime.reflect

pack-priv final Class AdaptedAccessor<BeanT, InMemValueT, OnWireValueT>

extends Accessor<BeanT, OnWireValueT>
Class Inheritance
Imports
org.glassfish.jaxb.runtime.api.AccessorException, org.glassfish.jaxb.core.v2.ClassFactory, org.glassfish.jaxb.core.v2.model.core.Adapter, org.glassfish.jaxb.runtime.v2.runtime.Coordinator, jakarta.xml.bind.annotation.adapters.XmlAdapter, java.util.concurrent.atomic.AtomicReference

Accessor that adapts the value by using Adapter.
Author
Kohsuke Kawaguchi
See Also
Accessor#adapt

Field Summary

Modifier and TypeField and Description
private final Class<? extends XmlAdapter<OnWireValueT, InMemValueT>>
private final Accessor<BeanT, InMemValueT>
private final AtomicReference<XmlAdapter<OnWireValueT, InMemValueT>>
staticAdapterReference

Sometimes Adapters are used directly by JAX-WS outside any Coordinator.

Inherited from org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor:
JAXB_ELEMENT_VALUEvalueType

Constructor Summary

AccessConstructor and Description
pack-priv
AdaptedAccessor(Class<OnWireValueT> targetType, Accessor<BeanT, InMemValueT> extThis, Class<? extends XmlAdapter<OnWireValueT, InMemValueT>> adapter)

Method Summary

Modifier and TypeMethod and Description
public OnWireValueT
get(BeanT bean)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.get.

Gets the value of the property of the given bean object.

private XmlAdapter<OnWireValueT, InMemValueT>
public Object
getUnadapted(BeanT bean)

Overrides org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.getUnadapted.

Sets the value without adapting the value.

public boolean
isAdapted()

Overrides org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.isAdapted.

Returns true if this accessor wraps an adapter.

public void
set(BeanT bean, OnWireValueT o)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.set.

Sets the value of the property of the given bean object.

public void
setUnadapted(BeanT bean, Object value)

Overrides org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.setUnadapted.

Sets the value without adapting the value.

Inherited from org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor:
adaptadaptgetErrorInstancegetValueTypeisAbstractableisValueTypeAbstractableoptimizereceive

Field Detail

adapterback to summary
private final Class<? extends XmlAdapter<OnWireValueT, InMemValueT>> adapter
coreback to summary
private final Accessor<BeanT, InMemValueT> core
staticAdapterReferenceback to summary
private final AtomicReference<XmlAdapter<OnWireValueT, InMemValueT>> staticAdapterReference

Sometimes Adapters are used directly by JAX-WS outside any Coordinator. Use this lazily-created cached XmlAdapter in such cases.

Constructor Detail

AdaptedAccessorback to summary
pack-priv AdaptedAccessor(Class<OnWireValueT> targetType, Accessor<BeanT, InMemValueT> extThis, Class<? extends XmlAdapter<OnWireValueT, InMemValueT>> adapter)

Method Detail

getback to summary
public OnWireValueT get(BeanT bean) throws AccessorException

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.get.

Doc from org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.get.

Gets the value of the property of the given bean object.

Annotations
@Override
Exceptions
AccessorException:
if failed to set a value. For example, the getter method may throw an exception.
getAdapterback to summary
private XmlAdapter<OnWireValueT, InMemValueT> getAdapter()
getUnadaptedback to summary
public Object getUnadapted(BeanT bean) throws AccessorException

Overrides org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.getUnadapted.

Doc from org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.getUnadapted.

Sets the value without adapting the value.

This ugly entry point is only used by JAX-WS. See JAXBRIContext#getElementPropertyAccessor

Annotations
@Override
isAdaptedback to summary
public boolean isAdapted()

Overrides org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.isAdapted.

Doc from org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.isAdapted.

Returns true if this accessor wraps an adapter.

This method needs to be used with care, but it helps some optimization.

Annotations
@Override
setback to summary
public void set(BeanT bean, OnWireValueT o) throws AccessorException

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.set.

Doc from org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.set.

Sets the value of the property of the given bean object.

Annotations
@Override
Exceptions
AccessorException:
if failed to set a value. For example, the setter method may throw an exception.
setUnadaptedback to summary
public void setUnadapted(BeanT bean, Object value) throws AccessorException

Overrides org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.setUnadapted.

Doc from org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor.setUnadapted.

Sets the value without adapting the value.

This ugly entry point is only used by JAX-WS. See JAXBRIContext#getElementPropertyAccessor

Annotations
@Override