public final class UnmarshallerImpl extends AbstractUnmarshallerImpl implements ValidationEventHandler, Closeable
This class can be extended by the generated code to provide type-safe unmarshall methods.
Unmarshaller.Listener| Modifier and Type | Field and Description |
|---|---|
protected JAXBContextImpl |
context
Owning
JAXBContext |
UnmarshallingContext |
coordinator |
static String |
FACTORY |
validating| Constructor and Description |
|---|
UnmarshallerImpl(JAXBContextImpl context,
AssociationMap assoc) |
setAdapter, setEventHandler, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshalprotected final JAXBContextImpl context
JAXBContextpublic final UnmarshallingContext coordinator
public static final String FACTORY
public UnmarshallerImpl(JAXBContextImpl context, AssociationMap assoc)
public UnmarshallerHandler getUnmarshallerHandler()
getUnmarshallerHandler in interface Unmarshallerprotected XMLReader getXMLReader() throws JAXBException
SAXSource object doesn't have XMLReader.
Unmarshaller is not re-entrant, so we will
only use one instance of XMLReader.
Overriden in order to fix potential security issue.getXMLReader in class AbstractUnmarshallerImplJAXBExceptionpublic final XmlVisitor createUnmarshallerHandler(InfosetScanner scanner, boolean inplace, JaxBeanInfo expectedType)
UnmarshallerHandler
and ValidationEventHandler. All the parsing errors
should be reported to this error handler for the unmarshalling
process to work correctly.
Also, returned handler expects all the XML names to be interned.public static boolean needsInterning(XMLReader reader)
protected Object unmarshal(XMLReader reader, InputSource source) throws JAXBException
unmarshal in class AbstractUnmarshallerImplJAXBExceptionprotected <T> JAXBElement<T> unmarshal(XMLReader reader, InputSource source, Class<T> expectedType) throws JAXBException
JAXBExceptionpublic <T> JAXBElement<T> unmarshal(Source source, Class<T> expectedType) throws JAXBException
unmarshal in interface Unmarshallerunmarshal in class AbstractUnmarshallerImplJAXBExceptionpublic Object unmarshal0(Source source, JaxBeanInfo expectedType) throws JAXBException
JAXBExceptionpublic final ValidationEventHandler getEventHandler()
getEventHandler in interface UnmarshallergetEventHandler in class AbstractUnmarshallerImplpublic final boolean hasEventHandler()
The default handler ignores any errors, and for that this method returns false.
public <T> JAXBElement<T> unmarshal(Node node, Class<T> expectedType) throws JAXBException
unmarshal in interface Unmarshallerunmarshal in class AbstractUnmarshallerImplJAXBExceptionpublic final Object unmarshal(Node node) throws JAXBException
unmarshal in interface UnmarshallerJAXBException@Deprecated public final Object unmarshal(SAXSource source) throws JAXBException
JAXBExceptionpublic final Object unmarshal0(Node node, JaxBeanInfo expectedType) throws JAXBException
JAXBExceptionpublic Object unmarshal(XMLStreamReader reader) throws JAXBException
unmarshal in interface Unmarshallerunmarshal in class AbstractUnmarshallerImplJAXBExceptionpublic <T> JAXBElement<T> unmarshal(XMLStreamReader reader, Class<T> expectedType) throws JAXBException
unmarshal in interface Unmarshallerunmarshal in class AbstractUnmarshallerImplJAXBExceptionpublic Object unmarshal0(XMLStreamReader reader, JaxBeanInfo expectedType) throws JAXBException
JAXBExceptionpublic <T> JAXBElement<T> unmarshal(XMLEventReader reader, Class<T> expectedType) throws JAXBException
unmarshal in interface Unmarshallerunmarshal in class AbstractUnmarshallerImplJAXBExceptionpublic Object unmarshal(XMLEventReader reader) throws JAXBException
unmarshal in interface Unmarshallerunmarshal in class AbstractUnmarshallerImplJAXBExceptionpublic Object unmarshal0(InputStream input, JaxBeanInfo expectedType) throws JAXBException
JAXBExceptionpublic Object getProperty(String name) throws PropertyException
getProperty in interface UnmarshallergetProperty in class AbstractUnmarshallerImplPropertyExceptionpublic void setProperty(String name, Object value) throws PropertyException
setProperty in interface UnmarshallersetProperty in class AbstractUnmarshallerImplPropertyExceptionpublic void setSchema(Schema schema)
setSchema in interface UnmarshallersetSchema in class AbstractUnmarshallerImplpublic Schema getSchema()
getSchema in interface UnmarshallergetSchema in class AbstractUnmarshallerImplpublic AttachmentUnmarshaller getAttachmentUnmarshaller()
getAttachmentUnmarshaller in interface UnmarshallergetAttachmentUnmarshaller in class AbstractUnmarshallerImplpublic void setAttachmentUnmarshaller(AttachmentUnmarshaller au)
setAttachmentUnmarshaller in interface UnmarshallersetAttachmentUnmarshaller in class AbstractUnmarshallerImplpublic boolean isValidating()
isValidating in interface UnmarshallerisValidating in class AbstractUnmarshallerImplpublic void setValidating(boolean validating)
setValidating in interface UnmarshallersetValidating in class AbstractUnmarshallerImplpublic <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter)
setAdapter in interface UnmarshallersetAdapter in class AbstractUnmarshallerImplpublic <A extends XmlAdapter> A getAdapter(Class<A> type)
getAdapter in interface UnmarshallergetAdapter in class AbstractUnmarshallerImplpublic UnmarshalException createUnmarshalException(SAXException e)
createUnmarshalException in class AbstractUnmarshallerImplpublic boolean handleEvent(ValidationEvent event)
Unmarshaller.handleEvent in interface ValidationEventHandlerpublic <T> JaxBeanInfo<T> getBeanInfo(Class<T> clazz) throws JAXBException
JAXBExceptionpublic Unmarshaller.Listener getListener()
getListener in interface UnmarshallergetListener in class AbstractUnmarshallerImplpublic void setListener(Unmarshaller.Listener listener)
setListener in interface UnmarshallersetListener in class AbstractUnmarshallerImplpublic UnmarshallingContext getContext()
protected void finalize()
throws Throwable
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2005–2017 Oracle Corporation. All rights reserved.