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

public final Class ValueProperty<BeanT>

extends PropertyImpl<BeanT>
Class Inheritance
Imports
org.glassfish.jaxb.runtime.api.AccessorException, org.glassfish.jaxb.core.v2.model.core.PropertyKind, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeValuePropertyInfo, org.glassfish.jaxb.runtime.v2.runtime.JAXBContextImpl, .XMLSerializer, org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor, .TransducedAccessor, org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.ChildLoader, .ValuePropertyLoader, org.glassfish.jaxb.runtime.v2.util.QNameMap, jakarta.xml.bind.annotation.XmlValue, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException, java.io.IOException

Property implementation for XmlValue properties.

This one works for both leaves and nodes, scalars and arrays.

Author
Bhakti Mehta ([email protected])

Field Summary

Modifier and TypeField and Description
private final Accessor<BeanT, ?>
private final TransducedAccessor<BeanT>
xacc

Heart of the conversion logic.

Inherited from org.glassfish.jaxb.runtime.v2.runtime.property.PropertyImpl:
fieldName

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
buildChildElementUnmarshallers(UnmarshallerChain chainElem, QNameMap<ChildLoader> handlers)

Implements org.glassfish.jaxb.runtime.v2.runtime.property.StructureLoaderBuilder.buildChildElementUnmarshallers.

Every Property class has an implementation of buildChildElementUnmarshallers which will fill in the specified QNameMap by elements that are expected by this property.

public String
getIdValue(BeanT bean)

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.getIdValue.

Gets the value of the property.

public PropertyKind
public boolean
public void
reset(BeanT o)

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.reset.

Resets the property value on the given object.

public void
public void
Inherited from org.glassfish.jaxb.runtime.v2.runtime.property.PropertyImpl:
getElementPropertyAccessorgetFieldNamegetInfoisHiddenByOverridesetHiddenByOverridewrapUp

Field Detail

accback to summary
private final Accessor<BeanT, ?> acc
xaccback to summary
private final TransducedAccessor<BeanT> xacc

Heart of the conversion logic.

Constructor Detail

ValuePropertyback to summary
public ValueProperty(JAXBContextImpl context, RuntimeValuePropertyInfo prop)

Method Detail

buildChildElementUnmarshallersback to summary
public void buildChildElementUnmarshallers(UnmarshallerChain chainElem, QNameMap<ChildLoader> handlers)

Implements org.glassfish.jaxb.runtime.v2.runtime.property.StructureLoaderBuilder.buildChildElementUnmarshallers.

Doc from org.glassfish.jaxb.runtime.v2.runtime.property.StructureLoaderBuilder.buildChildElementUnmarshallers.

Every Property class has an implementation of buildChildElementUnmarshallers which will fill in the specified QNameMap by elements that are expected by this property.

Annotations
@Override
getIdValueback to summary
public String getIdValue(BeanT bean) throws AccessorException, SAXException

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.getIdValue.

Doc from org.glassfish.jaxb.runtime.v2.runtime.property.Property.getIdValue.

Gets the value of the property. This method is only used when the corresponding PropertyInfo#id() is ID#ID, and therefore the return type is fixed to String.

Annotations
@Override
getKindback to summary
public PropertyKind getKind()

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.getKind.

Doc from org.glassfish.jaxb.runtime.v2.runtime.property.Property.getKind.

Gets the Kind of property

Annotations
@Override
hasSerializeURIActionback to summary
public boolean hasSerializeURIAction()

Overrides org.glassfish.jaxb.runtime.v2.runtime.property.PropertyImpl.hasSerializeURIAction.

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.hasSerializeURIAction.

Doc from org.glassfish.jaxb.runtime.v2.runtime.property.Property.hasSerializeURIAction.

Returns true if serializeURIs(Object, XMLSerializer) performs some meaningful action.

Annotations
@Override
resetback to summary
public void reset(BeanT o) throws AccessorException

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.reset.

Doc from org.glassfish.jaxb.runtime.v2.runtime.property.Property.reset.

Resets the property value on the given object.

... for example by setting 0 or null.

Annotations
@Override
serializeBodyback to summary
public void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException

Overrides org.glassfish.jaxb.runtime.v2.runtime.property.PropertyImpl.serializeBody.

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.serializeBody.

Annotations
@Override
Exceptions
AccessorException:

Doc from org.glassfish.jaxb.runtime.v2.runtime.property.Property.serializeBody.

If thrown, caught by the caller and reported.

serializeURIsback to summary
public void serializeURIs(BeanT o, XMLSerializer w) throws SAXException, AccessorException

Overrides org.glassfish.jaxb.runtime.v2.runtime.property.PropertyImpl.serializeURIs.

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.serializeURIs.

Annotations
@Override