|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.runtime.property.AttributeProperty<BeanT>
public final class AttributeProperty<BeanT>
Property
implementation for AttributePropertyInfo
.
This one works for both leaves and nodes, scalars and arrays.
Implements Comparable
so that it can be sorted lexicographically.
Field Summary | |
---|---|
Name |
attName
Attribute name. |
protected java.lang.String |
fieldName
Name of this field. |
TransducedAccessor<BeanT> |
xacc
Heart of the conversion logic. |
Fields inherited from interface com.sun.xml.bind.v2.runtime.property.StructureLoaderBuilder |
---|
CATCH_ALL, TEXT_HANDLER |
Constructor Summary | |
---|---|
AttributeProperty(JAXBContextImpl context,
RuntimeAttributePropertyInfo prop)
|
Method Summary | |
---|---|
void |
buildChildElementUnmarshallers(UnmarshallerChain chainElem,
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. |
int |
compareTo(AttributeProperty that)
|
Accessor |
getElementPropertyAccessor(java.lang.String nsUri,
java.lang.String localName)
If this property is mapped to the specified element, return an accessor to it. |
java.lang.String |
getIdValue(BeanT bean)
Gets the value of the property. |
RuntimePropertyInfo |
getInfo()
Provides more RuntimePropertyInfo information on the property. |
PropertyKind |
getKind()
Gets the Kind of property |
boolean |
hasSerializeURIAction()
Returns true if Property.serializeURIs(Object,XMLSerializer) performs some meaningful action. |
void |
reset(BeanT o)
Resets the property value on the given object. |
void |
serializeAttributes(BeanT o,
XMLSerializer w)
Marshals one attribute. |
void |
serializeBody(BeanT o,
XMLSerializer w,
java.lang.Object outerPeer)
|
void |
serializeURIs(BeanT o,
XMLSerializer w)
|
void |
wrapUp()
Called at the end of the JAXBContext initialization phase
to clean up any unnecessary references. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Name attName
public final TransducedAccessor<BeanT> xacc
protected final java.lang.String fieldName
Constructor Detail |
---|
public AttributeProperty(JAXBContextImpl context, RuntimeAttributePropertyInfo prop)
Method Detail |
---|
public void serializeAttributes(BeanT o, XMLSerializer w) throws org.xml.sax.SAXException, AccessorException, java.io.IOException, javax.xml.stream.XMLStreamException
org.xml.sax.SAXException
AccessorException
java.io.IOException
javax.xml.stream.XMLStreamException
JaxBeanInfo.serializeAttributes(Object, XMLSerializer)
public void serializeURIs(BeanT o, XMLSerializer w) throws AccessorException, org.xml.sax.SAXException
serializeURIs
in interface Property<BeanT>
AccessorException
org.xml.sax.SAXException
JaxBeanInfo.serializeURIs(Object, XMLSerializer)
public boolean hasSerializeURIAction()
Property
Property.serializeURIs(Object,XMLSerializer)
performs some meaningful action.
hasSerializeURIAction
in interface Property<BeanT>
public void buildChildElementUnmarshallers(UnmarshallerChain chainElem, QNameMap<ChildLoader> handlers)
StructureLoaderBuilder
QNameMap
by elements that are expected
by this property.
buildChildElementUnmarshallers
in interface StructureLoaderBuilder
public PropertyKind getKind()
Property
getKind
in interface Property<BeanT>
public void reset(BeanT o) throws AccessorException
Property
... for example by setting 0 or null.
reset
in interface Property<BeanT>
AccessorException
public java.lang.String getIdValue(BeanT bean) throws AccessorException, org.xml.sax.SAXException
Property
PropertyInfo.id()
is ID.ID
,
and therefore the return type is fixed to String
.
getIdValue
in interface Property<BeanT>
AccessorException
org.xml.sax.SAXException
public int compareTo(AttributeProperty that)
compareTo
in interface java.lang.Comparable<AttributeProperty>
public RuntimePropertyInfo getInfo()
Property
RuntimePropertyInfo
information on the property.
getInfo
in interface Property<BeanT>
JAXBContext
public void serializeBody(BeanT o, XMLSerializer w, java.lang.Object outerPeer) throws org.xml.sax.SAXException, AccessorException, java.io.IOException, javax.xml.stream.XMLStreamException
serializeBody
in interface Property<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 JAXBElement
s.
AccessorException
- If thrown, caught by the caller and reported.
org.xml.sax.SAXException
java.io.IOException
javax.xml.stream.XMLStreamException
JaxBeanInfo.serializeBody(Object, XMLSerializer)
public Accessor getElementPropertyAccessor(java.lang.String nsUri, java.lang.String localName)
Property
getElementPropertyAccessor
in interface Property<BeanT>
public void wrapUp()
Property
JAXBContext
initialization phase
to clean up any unnecessary references.
wrapUp
in interface Property<BeanT>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |