com.sun.xml.bind.v2.runtime.property

Interface Property<BeanT>

public interface Property<BeanT> extends StructureLoaderBuilder

A JAXB property that constitutes a JAXB-bound bean.
Method Summary
AccessorgetElementPropertyAccessor(String nsUri, String localName)
If this property is mapped to the specified element, return an accessor to it.
StringgetFieldName()
StringgetIdValue(BeanT bean)
Gets the value of the property.
RuntimePropertyInfogetInfo()
Provides more RuntimePropertyInfo information on the property.
PropertyKindgetKind()
Gets the Kind of property
booleanhasSerializeURIAction()
Returns true if Property performs some meaningful action.
booleanisHiddenByOverride()
voidreset(BeanT o)
Resets the property value on the given object.
voidserializeBody(BeanT beanT, XMLSerializer target, Object outerPeer)
voidserializeURIs(BeanT beanT, XMLSerializer target)
voidsetHiddenByOverride(boolean hidden)
voidwrapUp()
Called at the end of the JAXBContext initialization phase to clean up any unnecessary references.

Method Detail

getElementPropertyAccessor

public Accessor getElementPropertyAccessor(String nsUri, String localName)
If this property is mapped to the specified element, return an accessor to it.

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

getFieldName

public String getFieldName()

getIdValue

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

getInfo

public RuntimePropertyInfo getInfo()
Provides more RuntimePropertyInfo information on the property.

Returns: null if RETAIN_REFERENCE_TO_INFO property is not set on the JAXBContext

getKind

public PropertyKind getKind()
Gets the Kind of property

Returns: always non-null.

hasSerializeURIAction

public boolean hasSerializeURIAction()
Returns true if Property performs some meaningful action.

isHiddenByOverride

public boolean isHiddenByOverride()

reset

public void reset(BeanT o)
Resets the property value on the given object.

... for example by setting 0 or null.

serializeBody

public void serializeBody(BeanT beanT, XMLSerializer target, Object outerPeer)

Parameters: outerPeer 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.

Throws: AccessorException If thrown, caught by the caller and reported.

See Also:

serializeURIs

public void serializeURIs(BeanT beanT, XMLSerializer target)

See Also: JaxBeanInfo

setHiddenByOverride

public void setHiddenByOverride(boolean hidden)

wrapUp

public void wrapUp()
Called at the end of the JAXBContext initialization phase to clean up any unnecessary references.