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

pack-priv final Class SingleElementLeafProperty<BeanT>

extends PropertyImpl<BeanT>
Class Inheritance
Imports
org.glassfish.jaxb.runtime.api.AccessorException, org.glassfish.jaxb.core.v2.model.core.ID, .PropertyKind, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeElementPropertyInfo, .RuntimeTypeRef, org.glassfish.jaxb.runtime.v2.runtime.JAXBContextImpl, .Name, .XMLSerializer, org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor, .TransducedAccessor, org.glassfish.jaxb.runtime.v2.util.QNameMap, jakarta.xml.bind.JAXBElement, org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.*, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException, java.io.IOException, java.lang.reflect.Modifier

Property that contains a leaf value.
Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Modifier and TypeField and Description
private final Accessor<BeanT, ValueT>
private final String
private final boolean
private final boolean
private final boolean
private final Name
private final TransducedAccessor<BeanT>
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 chain, 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 Accessor<BeanT, ValueT>
public String
getIdValue(BeanT bean)

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

Gets the value of the property.

public PropertyKind
private boolean
isNillableAbstract(BeanT bean, JAXBContextImpl context, Object value, Class<T> valueTypeClass)

Checks if element is nillable and represented by abstract class.

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
private boolean
xsiTypeNeeded(BeanT bean, XMLSerializer w, Object value, Class<T> valueTypeClass)

Checks if xsi type needed to be specified

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

Field Detail

accback to summary
private final Accessor<BeanT, ValueT> acc
defaultValueback to summary
private final String defaultValue
idRefback to summary
private final boolean idRef
improvedXsiTypeHandlingback to summary
private final boolean improvedXsiTypeHandling
nillableback to summary
private final boolean nillable
tagNameback to summary
private final Name tagName
xaccback to summary
private final TransducedAccessor<BeanT> xacc

Constructor Detail

SingleElementLeafPropertyback to summary
public SingleElementLeafProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop)

Method Detail

buildChildElementUnmarshallersback to summary
public void buildChildElementUnmarshallers(UnmarshallerChain chain, 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
getElementPropertyAccessorback to summary
public Accessor<BeanT, ValueT> getElementPropertyAccessor(String nsUri, String localName)

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

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

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

If this property is mapped to the specified element, return an accessor to it.

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
isNillableAbstractback to summary
private boolean isNillableAbstract(BeanT bean, JAXBContextImpl context, Object value, Class<T> valueTypeClass)

Checks if element is nillable and represented by abstract class.

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.

xsiTypeNeededback to summary
private boolean xsiTypeNeeded(BeanT bean, XMLSerializer w, Object value, Class<T> valueTypeClass)

Checks if xsi type needed to be specified