com.sun.xml.bind.v2.runtime.property
Interface Property<BeanT>

All Superinterfaces:
StructureLoaderBuilder
All Known Implementing Classes:
ArrayElementLeafProperty, ArrayElementNodeProperty, ArrayElementProperty, ArrayERProperty, ArrayProperty, ArrayReferenceNodeProperty, AttributeProperty, ListElementProperty, PropertyImpl, SingleElementLeafProperty, SingleElementNodeProperty, SingleMapNodeProperty, SingleReferenceNodeProperty, ValueProperty

public interface Property<BeanT>
extends StructureLoaderBuilder

A JAXB property that constitutes a JAXB-bound bean.


Field Summary
 
Fields inherited from interface com.sun.xml.bind.v2.runtime.property.StructureLoaderBuilder
CATCH_ALL, TEXT_HANDLER
 
Method Summary
 Accessor getElementPropertyAccessor(String nsUri, String localName)
          If this property is mapped to the specified element, return an accessor to it.
 String getIdValue(BeanT bean)
          Gets the value of the property.
 PropertyKind getKind()
          Gets the Kind of property
 boolean hasSerializeURIAction()
          Returns true if serializeURIs(Object,XMLSerializer) performs some meaningful action.
 void reset(BeanT o)
          Resets the property value on the given object.
 void serializeBody(BeanT beanT, XMLSerializer target, Object outerPeer)
           
 void serializeURIs(BeanT beanT, XMLSerializer target)
           
 void wrapUp()
          Called at the end of the JAXBContext initialization phase to clean up any unnecessary references.
 
Methods inherited from interface com.sun.xml.bind.v2.runtime.property.StructureLoaderBuilder
buildChildElementUnmarshallers
 

Method Detail

reset

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

... for example by setting 0 or null.

Throws:
AccessorException

serializeBody

void serializeBody(BeanT beanT,
                   XMLSerializer target,
                   Object outerPeer)
                   throws SAXException,
                          AccessorException,
                          IOException,
                          javax.xml.stream.XMLStreamException
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.
SAXException
IOException
javax.xml.stream.XMLStreamException
See Also:
JaxBeanInfo.serializeBody(Object, XMLSerializer)

serializeURIs

void serializeURIs(BeanT beanT,
                   XMLSerializer target)
                   throws SAXException,
                          AccessorException
Throws:
SAXException
AccessorException
See Also:
JaxBeanInfo.serializeURIs(Object, XMLSerializer)

hasSerializeURIAction

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


getIdValue

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.

Throws:
AccessorException
SAXException

getKind

PropertyKind getKind()
Gets the Kind of property

Returns:
always non-null.

getElementPropertyAccessor

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.

wrapUp

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