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

pack-priv final Class SingleReferenceNodeProperty<BeanT, ValueT>

extends PropertyImpl<BeanT>
Class Inheritance
Imports
org.glassfish.jaxb.runtime.api.AccessorException, org.glassfish.jaxb.core.v2.ClassFactory, org.glassfish.jaxb.core.v2.model.core.PropertyKind, .WildcardMode, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeElement, .RuntimeReferencePropertyInfo, org.glassfish.jaxb.runtime.v2.runtime.ElementBeanInfoImpl, .JAXBContextImpl, .JaxBeanInfo, .XMLSerializer, org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor, org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.ChildLoader, .WildcardLoader, org.glassfish.jaxb.runtime.v2.util.QNameMap, jakarta.xml.bind.JAXBElement, .JAXBException, jakarta.xml.bind.annotation.DomHandler, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException, java.io.IOException

Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private final Accessor<BeanT, ValueT>
private final DomHandler<ElementT, ResultT extends Result>
private final QNameMap<JaxBeanInfo<BeanT>>
private final WildcardMode
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
Inherited from org.glassfish.jaxb.runtime.v2.runtime.property.PropertyImpl:
getFieldNamegetInfohasSerializeURIActionisHiddenByOverrideserializeURIssetHiddenByOverridewrapUp

Field Detail

accback to summary
private final Accessor<BeanT, ValueT> acc
domHandlerback to summary
private final DomHandler<ElementT, ResultT extends Result> domHandler
expectedElementsback to summary
private final QNameMap<JaxBeanInfo<BeanT>> expectedElements
wcModeback to summary
private final WildcardMode wcMode

Constructor Detail

SingleReferenceNodePropertyback to summary
public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo 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.