| java.lang.Object com.sun.xml.bind.v2.runtime.Coordinator com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext
Inner Class :final public class State | |
Method Summary | |
public void | addPatcher(Patcher job) Adds a job that will be executed at the last of the unmarshalling. | public String | addToIdTable(String id) Adds the object which is currently being unmarshalled
to the ID table. | public Object | createInstance(Class> clazz) Creates a new instance of the specified class. | public Object | createInstance(JaxBeanInfo beanInfo) Creates a new instance of the specified class. | public void | endDocument() | final public void | endElement(TagName tagName) | public void | endPrefixMapping(String prefix) | public void | endScope(int frameSize) Ends the current packing scope. | public void | errorUnresolvedIDREF(Object bean, String idref, LocatorEx loc) Called when there's no corresponding ID value. | public boolean | expectText() You should be always calling this through
TextPredictor . | public String[] | getAllDeclaredPrefixes() Returns a list of all in-scope prefixes.
A possible zero-length array of prefixes. | public UnmarshallingContext | getContext() | public State | getCurrentState() | public Object | getInnerPeer() Gets the inner peer JAXB object associated with the current element. | public static UnmarshallingContext | getInstance() When called from within the realm of the unmarshaller, this method
returns the current
UnmarshallingContext in charge. | public JAXBContextImpl | getJAXBContext() | protected ValidationEventLocator | getLocation() | public LocatorEx | getLocator() Gets the current source location information in SAX
Locator . | public String | getNamespaceURI(String prefix) | public String[] | getNewlyDeclaredPrefixes() Returns a list of prefixes newly declared on the current element.
A possible zero-length array of prefixes. | public Callable | getObjectFromId(String id, Class targetType) Looks up the ID table and gets associated object. | public Object | getOuterPeer() Gets the outer peer JAXB object associated with the current element. | public TextPredictor | getPredictor() You should be always getting
TextPredictor from
XmlVisitor . | public String | getPrefix(String uri) | public Iterator<String> | getPrefixes(String uri) | public Object | getResult() | public Scope | getScope(int offset) Gets the currently active
Scope . | public String | getXMIMEContentType() Gets the xmime:contentType value for the current object. | public void | handleError(Exception e) Reports an exception found during the unmarshalling to the user. | public void | handleError(Exception e, boolean canRecover) | public void | handleError(String msg) | public void | handleEvent(ValidationEvent event, boolean canRecover) Reports an error to the user, and asks if s/he wants
to recover. | public boolean | handleEvent(ValidationEvent event) | public void | recordInnerPeer(Object innerPeer) Notifies the context about the inner peer of the current element.
If the unmarshalling is building the association, the context
will use this information. | public void | recordOuterPeer(Object outerPeer) Notifies the context about the outer peer of the current element.
If the unmarshalling is building the association, the context
will use this information. | public void | reset(InfosetScanner scanner, boolean isInplaceMode, JaxBeanInfo expectedType, IDResolver idResolver) | public Loader | selectRootLoader(State state, TagName tag) On top of
JAXBContextImpl.selectRootLoader(StateTagName) ,
this method also consults
ClassResolver . | public void | setFactories(Object factoryInstances) | public void | startDocument(LocatorEx locator, NamespaceContext nsContext) | public void | startElement(TagName tagName) | public void | startPrefixMapping(String prefix, String uri) | public void | startScope(int frameSize) Starts a new packing scope.
This method allocates a specified number of fresh
Scope objects.
They can be accessed by the
UnmarshallingContext.getScope method until the corresponding
UnmarshallingContext.endScope method is invoked.
A new scope will mask the currently active scope. | public void | text(CharSequence pcdata) |
classResolver | public ClassResolver classResolver(Code) | | Used to discover additional classes when we hit unknown elements/types.
|
UnmarshallingContext | public UnmarshallingContext(UnmarshallerImpl _parent, AssociationMap assoc)(Code) | | Creates a new unmarshaller.
Parameters: assoc - Must be both non-null when the unmarshaller does thein-place unmarshalling. Otherwise must be both null. |
addPatcher | public void addPatcher(Patcher job)(Code) | | Adds a job that will be executed at the last of the unmarshalling.
This method is used to support ID/IDREF feature, but it can be used
for other purposes as well.
Parameters: job - The run method of this object is called. |
addToIdTable | public String addToIdTable(String id) throws SAXException(Code) | | Adds the object which is currently being unmarshalled
to the ID table.
Returns the value passed as the parameter.This is a hack, but this makes it easier for IDtransducer to do its job. |
createInstance | public Object createInstance(Class> clazz) throws SAXException(Code) | | Creates a new instance of the specified class.
In the unmarshaller, we need to check the user-specified factory class.
|
createInstance | public Object createInstance(JaxBeanInfo beanInfo) throws SAXException(Code) | | Creates a new instance of the specified class.
In the unmarshaller, we need to check the user-specified factory class.
|
endPrefixMapping | public void endPrefixMapping(String prefix)(Code) | | |
expectText | public boolean expectText()(Code) | | You should be always calling this through
TextPredictor .
|
getAllDeclaredPrefixes | public String[] getAllDeclaredPrefixes()(Code) | | Returns a list of all in-scope prefixes.
A possible zero-length array of prefixes. The default prefixis represented by the empty string. |
getCurrentState | public State getCurrentState()(Code) | | |
getInnerPeer | public Object getInnerPeer()(Code) | | Gets the inner peer JAXB object associated with the current element.
null if the current element doesn't have an inner peer,or if we are not doing the in-place unmarshalling. |
getLocator | public LocatorEx getLocator()(Code) | | Gets the current source location information in SAX
Locator .
Sometimes the unmarshaller works against a different kind of XML source,
making this information meaningless.
|
getNewlyDeclaredPrefixes | public String[] getNewlyDeclaredPrefixes()(Code) | | Returns a list of prefixes newly declared on the current element.
A possible zero-length array of prefixes. The default prefixis represented by the empty string. |
getOuterPeer | public Object getOuterPeer()(Code) | | Gets the outer peer JAXB object associated with the current element.
null if the current element doesn't have an inner peer,or if we are not doing the in-place unmarshalling. |
getPredictor | public TextPredictor getPredictor()(Code) | | You should be always getting
TextPredictor from
XmlVisitor .
|
getScope | public Scope getScope(int offset)(Code) | | Gets the currently active
Scope .
Parameters: offset - a number between [0,frameSize)always a valid Scope object. |
handleEvent | public void handleEvent(ValidationEvent event, boolean canRecover) throws SAXException(Code) | | Reports an error to the user, and asks if s/he wants
to recover. If the canRecover flag is false, regardless
of the client instruction, an exception will be thrown.
Only if the flag is true and the user wants to recover from an error,
the method returns normally.
The thrown exception will be catched by the unmarshaller.
|
recordInnerPeer | public void recordInnerPeer(Object innerPeer)(Code) | | Notifies the context about the inner peer of the current element.
If the unmarshalling is building the association, the context
will use this information. Otherwise it will be just ignored.
|
recordOuterPeer | public void recordOuterPeer(Object outerPeer)(Code) | | Notifies the context about the outer peer of the current element.
If the unmarshalling is building the association, the context
will use this information. Otherwise it will be just ignored.
|
setFactories | public void setFactories(Object factoryInstances)(Code) | | |
startScope | public void startScope(int frameSize)(Code) | | Starts a new packing scope.
This method allocates a specified number of fresh
Scope objects.
They can be accessed by the
UnmarshallingContext.getScope method until the corresponding
UnmarshallingContext.endScope method is invoked.
A new scope will mask the currently active scope. Only one frame of
Scope s
can be accessed at any given time.
Parameters: frameSize - The # of slots to be allocated. |
|
|