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

public Interface Property<BeanT>

extends StructureLoaderBuilder
Known Direct Implementers
org.glassfish.jaxb.runtime.v2.runtime.property.PropertyImpl
Imports
org.glassfish.jaxb.runtime.api.AccessorException, org.glassfish.jaxb.core.v2.model.core.ID, .PropertyInfo, .PropertyKind, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimePropertyInfo, org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo, .XMLSerializer, org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor, jakarta.xml.bind.JAXBContext, .JAXBElement, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException, java.io.IOException

A JAXB property that constitutes a JAXB-bound bean.
Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Inherited from org.glassfish.jaxb.runtime.v2.runtime.property.StructureLoaderBuilder:
CATCH_ALLTEXT_HANDLER

Method Summary

Modifier and TypeMethod and Description
public Accessor<BeanT, ValueT>

Returns:

null if the property is not mapped to the specified element.
getElementPropertyAccessor
(String nsUri, String localName)

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

public String
public String
getIdValue(BeanT bean)

Gets the value of the property.

public RuntimePropertyInfo

Returns:

null if RETAIN_REFERENCE_TO_INFO property is not set on the JAXBContext
getInfo
()

Provides more RuntimePropertyInfo information on the property.

public PropertyKind

Returns:

always non-null.
getKind
()

Gets the Kind of property

public boolean
hasSerializeURIAction()

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

public boolean
public void
reset(BeanT o)

Resets the property value on the given object.

public void
serializeBody(BeanT beanT, XMLSerializer target, Object
used when this property is expected to print out an element and that should be associated with this outer peer. normally null. this is only used for JaxBeanInfo for JAXBElements.
outerPeer
)

public void
serializeURIs(BeanT beanT, XMLSerializer target)

public void
setHiddenByOverride(boolean hidden)

public void
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.StructureLoaderBuilder:
buildChildElementUnmarshallers

Method Detail

getElementPropertyAccessorback to summary
public Accessor<BeanT, ValueT> getElementPropertyAccessor(String nsUri, String localName)

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

Returns:Accessor<BeanT, ValueT>

null if the property is not mapped to the specified element.

getFieldNameback to summary
public String getFieldName()
getIdValueback to summary
public String getIdValue(BeanT bean) throws AccessorException, SAXException

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.

getInfoback to summary
public RuntimePropertyInfo getInfo()

Provides more RuntimePropertyInfo information on the property.

Returns:RuntimePropertyInfo

null if RETAIN_REFERENCE_TO_INFO property is not set on the JAXBContext

getKindback to summary
public PropertyKind getKind()

Gets the Kind of property

Returns:PropertyKind

always non-null.

hasSerializeURIActionback to summary
public boolean hasSerializeURIAction()

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

isHiddenByOverrideback to summary
public boolean isHiddenByOverride()
resetback to summary
public void reset(BeanT o) throws AccessorException

Resets the property value on the given object.

... for example by setting 0 or null.

serializeBodyback to summary
public void serializeBody(BeanT beanT, XMLSerializer target, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException
Parameters
outerPeer:Object

used when this property is expected to print out an element and that should be associated with this outer peer. normally null. this is only used for JaxBeanInfo for JAXBElements.

Exceptions
AccessorException:
If thrown, caught by the caller and reported.
See Also
JaxBeanInfo#serializeBody(Object, XMLSerializer)
serializeURIsback to summary
public void serializeURIs(BeanT beanT, XMLSerializer target) throws SAXException, AccessorException
See Also
JaxBeanInfo#serializeURIs(Object, XMLSerializer)
setHiddenByOverrideback to summary
public void setHiddenByOverride(boolean hidden)
wrapUpback to summary
public void wrapUp()

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