com.sun.xml.bind.v2.runtime.property
Class SingleMapNodeProperty<BeanT,ValueT extends Map>

java.lang.Object
  extended by com.sun.xml.bind.v2.runtime.property.PropertyImpl<BeanT>
      extended by com.sun.xml.bind.v2.runtime.property.SingleMapNodeProperty<BeanT,ValueT>
All Implemented Interfaces:
Property<BeanT>, StructureLoaderBuilder

final class SingleMapNodeProperty<BeanT,ValueT extends Map>
extends PropertyImpl<BeanT>


Field Summary
 
Fields inherited from class com.sun.xml.bind.v2.runtime.property.PropertyImpl
fieldName
 
Fields inherited from interface com.sun.xml.bind.v2.runtime.property.StructureLoaderBuilder
CATCH_ALL, TEXT_HANDLER
 
Constructor Summary
SingleMapNodeProperty(JAXBContextImpl context, RuntimeMapPropertyInfo prop)
           
 
Method Summary
 void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers)
          Every Property class has an implementation of buildChildElementUnmarshallers which will fill in the specified QNameMap by elements that are expected by this property.
 Accessor getElementPropertyAccessor(String nsUri, String localName)
          If this property is mapped to the specified element, return an accessor to it.
 String getIdValue(BeanT bean)
          A Map property can never be ID.
 PropertyKind getKind()
          Gets the Kind of property
 void reset(BeanT bean)
          Resets the property value on the given object.
 void serializeBody(BeanT o, XMLSerializer w, Object outerPeer)
           
 
Methods inherited from class com.sun.xml.bind.v2.runtime.property.PropertyImpl
hasSerializeURIAction, serializeURIs, wrapUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleMapNodeProperty

public SingleMapNodeProperty(JAXBContextImpl context,
                             RuntimeMapPropertyInfo prop)
Method Detail

reset

public void reset(BeanT bean)
           throws AccessorException
Description copied from interface: Property
Resets the property value on the given object.

... for example by setting 0 or null.

Throws:
AccessorException

getIdValue

public String getIdValue(BeanT bean)
A Map property can never be ID.


getKind

public PropertyKind getKind()
Description copied from interface: Property
Gets the Kind of property

Returns:
always non-null.

buildChildElementUnmarshallers

public void buildChildElementUnmarshallers(UnmarshallerChain chain,
                                           QNameMap<ChildLoader> handlers)
Description copied from interface: StructureLoaderBuilder
Every Property class has an implementation of buildChildElementUnmarshallers which will fill in the specified QNameMap by elements that are expected by this property.


serializeBody

public void serializeBody(BeanT o,
                          XMLSerializer w,
                          Object outerPeer)
                   throws SAXException,
                          AccessorException,
                          IOException,
                          javax.xml.stream.XMLStreamException
Specified by:
serializeBody in interface Property<BeanT>
Overrides:
serializeBody in class PropertyImpl<BeanT>
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)

getElementPropertyAccessor

public Accessor getElementPropertyAccessor(String nsUri,
                                           String localName)
Description copied from interface: Property
If this property is mapped to the specified element, return an accessor to it.

Specified by:
getElementPropertyAccessor in interface Property<BeanT>
Overrides:
getElementPropertyAccessor in class PropertyImpl<BeanT>
Returns:
null if the property is not mapped to the specified element.