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

pack-priv final Class SingleElementNodeProperty<BeanT, ValueT>

extends PropertyImpl<BeanT>
Class Inheritance
Imports
org.glassfish.jaxb.runtime.api.AccessorException, org.glassfish.jaxb.core.v2.model.core.PropertyKind, .TypeRef, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeElementPropertyInfo, .RuntimeTypeInfo, .RuntimeTypeRef, org.glassfish.jaxb.runtime.v2.runtime.JAXBContextImpl, .JaxBeanInfo, .Name, .XMLSerializer, org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor, org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.ChildLoader, .DefaultValueLoaderDecorator, .Loader, .XsiNilLoader, org.glassfish.jaxb.runtime.v2.util.QNameMap, jakarta.xml.bind.JAXBElement, org.xml.sax.SAXException, javax.xml.namespace.QName, javax.xml.stream.XMLStreamException, java.io.IOException, java.lang.reflect.Modifier, .Type, java.util.HashMap, .Map

Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Modifier and TypeField and Description
private final Accessor<BeanT, ValueT>
private final QName[]
private final boolean
private final Name
nullTagName

The tag name used to produce xsi:nil.

private RuntimeElementPropertyInfo
private final Map<Class<T>, TagAndType>
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 beanT)

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

Gets the value of the property.

public PropertyKind
public void
reset(BeanT bean)

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

Resets the property value on the given object.

public void
public void
wrapUp()

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

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

Called at the end of the JAXBContext initialization phase to clean up any unnecessary references.

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

Field Detail

accback to summary
private final Accessor<BeanT, ValueT> acc
acceptedElementsback to summary
private final QName[] acceptedElements
nillableback to summary
private final boolean nillable
nullTagNameback to summary
private final Name nullTagName

The tag name used to produce xsi:nil. The first one in the list.

propback to summary
private RuntimeElementPropertyInfo prop
typeNamesback to summary
private final Map<Class<T>, TagAndType> typeNames

Constructor Detail

SingleElementNodePropertyback to summary
public SingleElementNodeProperty(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 beanT)

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
resetback to summary
public void reset(BeanT bean) 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.

wrapUpback to summary
public void wrapUp()

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

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

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

Called at the end of the JAXBContext initialization phase to clean up any unnecessary references.

Annotations
@Override