Save This Page
Home » openjdk-7 » com.sun.xml.internal » bind » v2 » runtime » unmarshaller » [javadoc | source]
com.sun.xml.internal.bind.v2.runtime.unmarshaller
public final class: UnmarshallingContext [javadoc | source]
java.lang.Object
   com.sun.xml.internal.bind.v2.runtime.Coordinator
      com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext

All Implemented Interfaces:
    ErrorHandler, ValidationEventHandler, TextPredictor, NamespaceContext, XmlVisitor

Center of the unmarshalling.

This object is responsible for coordinating Loader s to perform the whole unmarshalling.

Nested Class Summary:
public final class  UnmarshallingContext.State  State information for each element. 
Field Summary
public final  UnmarshallerImpl parent     
Fields inherited from com.sun.xml.internal.bind.v2.runtime.Coordinator:
guyWhoSetTheTableToNull
Constructor:
 public UnmarshallingContext(UnmarshallerImpl _parent,
    AssociationMap assoc) 
    Creates a new unmarshaller.
    Parameters:
    assoc - Must be both non-null when the unmarshaller does the in-place unmarshalling. Otherwise must be both null.
Method from com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext Summary:
addPatcher,   addToIdTable,   createInstance,   createInstance,   endDocument,   endElement,   endPrefixMapping,   endScope,   errorUnresolvedIDREF,   expectText,   getAllDeclaredPrefixes,   getContext,   getCurrentState,   getInnerPeer,   getInstance,   getJAXBContext,   getLocation,   getLocator,   getNamespaceURI,   getNewlyDeclaredPrefixes,   getObjectFromId,   getOuterPeer,   getPredictor,   getPrefix,   getPrefixes,   getResult,   getScope,   getXMIMEContentType,   handleError,   handleError,   handleError,   handleEvent,   handleEvent,   recordInnerPeer,   recordOuterPeer,   reset,   setFactories,   startDocument,   startElement,   startPrefixMapping,   startScope,   text
Methods from com.sun.xml.internal.bind.v2.runtime.Coordinator:
_getInstance,   containsAdapter,   error,   fatalError,   getAdapter,   getLocation,   popCoordinator,   pushCoordinator,   putAdapter,   resetThreadAffinity,   setThreadAffinity,   warning
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext Detail:
 public  void addPatcher(Patcher job) 
    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.
 public String addToIdTable(String id) throws SAXException 
    Adds the object which is currently being unmarshalled to the ID table.
 public Object createInstance(Class clazz) throws SAXException 
    Creates a new instance of the specified class. In the unmarshaller, we need to check the user-specified factory class.
 public Object createInstance(JaxBeanInfo beanInfo) throws SAXException 
    Creates a new instance of the specified class. In the unmarshaller, we need to check the user-specified factory class.
 public  void endDocument() throws SAXException 
 public final  void endElement(TagName tagName) throws SAXException 
 public  void endPrefixMapping(String prefix) 
 public  void endScope(int frameSize) throws SAXException 
    Ends the current packing scope.

    If any packing in progress will be finalized by this method.

 public  void errorUnresolvedIDREF(Object bean,
    String idref) throws SAXException 
    Called when there's no corresponding ID value.
 public boolean expectText() 
 public String[] getAllDeclaredPrefixes() 
    Returns a list of all in-scope prefixes.
 public UnmarshallingContext getContext() 
 public UnmarshallingContext.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 .

    Sometimes the unmarshaller works against a different kind of XML source, making this information meaningless.

 public String getNamespaceURI(String prefix) 
 public String[] getNewlyDeclaredPrefixes() 
    Returns a list of prefixes newly declared on the current element.
 public Callable getObjectFromId(String id,
    Class targetType) throws SAXException 
    Looks up the ID table and gets associated object.

    The exception thrown from Callable#call() means the unmarshaller should abort right away.

 public Object getOuterPeer() 
    Gets the outer peer JAXB object associated with the current element.
 public TextPredictor getPredictor() 
 public String getPrefix(String uri) 
 public Iterator getPrefixes(String uri) 
 public Object getResult() throws UnmarshalException 
    Gets the result of the unmarshalling
 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) throws SAXException 
 public  void handleError(String msg) 
 public  void handleError(Exception e,
    boolean canRecover) throws SAXException 
 public boolean handleEvent(ValidationEvent event) 
 public  void handleEvent(ValidationEvent event,
    boolean canRecover) throws SAXException 
    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.
 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. Otherwise it will be just ignored.

 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. Otherwise it will be just ignored.

 public  void reset(InfosetScanner scanner,
    boolean isInplaceMode,
    JaxBeanInfo expectedType,
    IDResolver idResolver) 
 public  void setFactories(Object factoryInstances) 
 public  void startDocument(LocatorEx locator,
    NamespaceContext nsContext) throws SAXException 
 public  void startElement(TagName tagName) throws SAXException 
 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 #getScope method until the corresponding #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.

 public  void text(CharSequence pcdata) throws SAXException