|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.runtime.JaxBeanInfo
com.sun.xml.bind.v2.runtime.ValueListBeanInfoImpl
final class ValueListBeanInfoImpl
JaxBeanInfo
implementation that binds T[] to a list of simple types.
Field Summary |
---|
Fields inherited from class com.sun.xml.bind.v2.runtime.JaxBeanInfo |
---|
flag, jaxbType |
Constructor Summary | |
---|---|
ValueListBeanInfoImpl(JAXBContextImpl owner,
Class arrayType)
|
Method Summary | |
---|---|
Object |
createInstance(UnmarshallingContext context)
Creates a new instance of the bean. |
String |
getElementLocalName(Object array)
Returns the local name portion of the element name, if the bean that this class represents is mapped from/to an XML element. |
String |
getElementNamespaceURI(Object array)
Returns the namespace URI portion of the element name, if the bean that this class represents is mapped from/to an XML element. |
String |
getId(Object array,
XMLSerializer target)
Gets the ID value of the given bean, if it has an ID value. |
Loader |
getLoader(JAXBContextImpl context,
boolean typeSubstitutionCapable)
Gets the Loader that will unmarshall the given object. |
Transducer |
getTransducer()
If the bean's representation in XML is just a text, this method return a Transducer that lets you convert
values between the text and the bean. |
boolean |
reset(Object array,
UnmarshallingContext context)
Resets the object to the initial state, as if the object is created fresh. |
void |
serializeAttributes(Object array,
XMLSerializer target)
Serializes attributes into the specified target. |
void |
serializeBody(Object array,
XMLSerializer target)
Serializes child elements and texts into the specified target. |
void |
serializeRoot(Object array,
XMLSerializer target)
Serializes the bean as the root element. |
void |
serializeURIs(Object array,
XMLSerializer target)
Declares all the namespace URIs this object is using at its top-level scope into the specified target. |
Methods inherited from class com.sun.xml.bind.v2.runtime.JaxBeanInfo |
---|
getLifecycleMethods, getTypeName, getTypeNames, hasAfterMarshalMethod, hasAfterUnmarshalMethod, hasBeforeMarshalMethod, hasBeforeUnmarshalMethod, hasElementOnlyContentModel, hasElementOnlyContentModel, invokeAfterUnmarshalMethod, invokeBeforeUnmarshalMethod, isElement, isImmutable, link, lookForLifecycleMethods, setLifecycleFlags, wrapUp |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValueListBeanInfoImpl(JAXBContextImpl owner, Class arrayType) throws JAXBException
JAXBException
Method Detail |
---|
public void serializeBody(Object array, XMLSerializer target) throws SAXException, IOException, javax.xml.stream.XMLStreamException
JaxBeanInfo
serializeBody
in class JaxBeanInfo
SAXException
IOException
javax.xml.stream.XMLStreamException
public final void serializeURIs(Object array, XMLSerializer target) throws SAXException
JaxBeanInfo
serializeURIs
in class JaxBeanInfo
SAXException
public final String getElementNamespaceURI(Object array)
JaxBeanInfo
getElementNamespaceURI
in class JaxBeanInfo
public final String getElementLocalName(Object array)
JaxBeanInfo
getElementLocalName
in class JaxBeanInfo
public final Object createInstance(UnmarshallingContext context)
JaxBeanInfo
This operation is only supported when JaxBeanInfo.isImmutable()
is false.
createInstance
in class JaxBeanInfo
context
- Sometimes the created bean remembers the corresponding source location,public final boolean reset(Object array, UnmarshallingContext context)
JaxBeanInfo
This is used to reuse an existing object for unmarshalling.
reset
in class JaxBeanInfo
context
- used for reporting any errors.
If the object is resettable but failed by an error, it should be reported to the context, then return false. If the object is not resettable to begin with, do not report an error.
public final String getId(Object array, XMLSerializer target)
JaxBeanInfo
getId
in class JaxBeanInfo
public final void serializeAttributes(Object array, XMLSerializer target)
JaxBeanInfo
serializeAttributes
in class JaxBeanInfo
public final void serializeRoot(Object array, XMLSerializer target) throws SAXException
JaxBeanInfo
In the java-to-schema binding, an object might marshal in two different ways depending on whether it is used as the root of the graph or not. In the former case, an object could marshal as an element, whereas in the latter case, it marshals as a type.
This method is used to marshal the root of the object graph to allow this semantics to be implemented.
It is doubtful to me if it's a good idea for an object to marshal in two ways depending on the context.
For schema-to-java, this is equivalent to JaxBeanInfo.serializeBody(Object, XMLSerializer)
.
serializeRoot
in class JaxBeanInfo
SAXException
public final Transducer getTransducer()
JaxBeanInfo
Transducer
that lets you convert
values between the text and the bean.
getTransducer
in class JaxBeanInfo
public final Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable)
JaxBeanInfo
Loader
that will unmarshall the given object.
getLoader
in class JaxBeanInfo
context
- The JAXBContextImpl
object that governs this object.
This object is taken as a parameter so that JaxBeanInfo
doesn't have
to store them on its own.
When this method is invoked from within the unmarshaller, tihs parameter can be
null (because the loader is constructed already.)typeSubstitutionCapable
- If true, the returned Loader
is capable of recognizing @xsi:type (if necessary)
and unmarshals a subtype. This allowes an optimization where this bean info
is guaranteed not to have a type substitution.
If false, the returned Loader
doesn't look for @xsi:type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |