Class SAXConnector
- java.lang.Object
-
- com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector
-
- All Implemented Interfaces:
UnmarshallerHandler
,ContentHandler
public final class SAXConnector extends Object implements UnmarshallerHandler
Receives SAX events and convert them to our internal events.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description SAXConnector(XmlVisitor next, LocatorEx externalLocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] buf, int start, int len)
void
endDocument()
void
endElement(String uri, String localName, String qName)
void
endPrefixMapping(String prefix)
UnmarshallingContext
getContext()
Object
getResult()
void
ignorableWhitespace(char[] buf, int start, int len)
void
processingInstruction(String target, String data)
void
setDocumentLocator(Locator locator)
void
skippedEntity(String name)
void
startDocument()
void
startElement(String uri, String local, String qname, Attributes atts)
void
startPrefixMapping(String prefix, String uri)
-
-
-
Constructor Detail
-
SAXConnector
public SAXConnector(XmlVisitor next, LocatorEx externalLocator)
- Parameters:
externalLocator
- If the caller is producing SAX events from sources other than Unicode and angle brackets, the caller can override the default SAXLocator
object by this object to provide better location information.
-
-
Method Detail
-
getResult
public Object getResult() throws JAXBException, IllegalStateException
- Specified by:
getResult
in interfaceUnmarshallerHandler
- Throws:
JAXBException
IllegalStateException
-
getContext
public UnmarshallingContext getContext()
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interfaceContentHandler
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String local, String qname, Attributes atts) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
characters
public final void characters(char[] buf, int start, int len)
- Specified by:
characters
in interfaceContentHandler
-
ignorableWhitespace
public final void ignorableWhitespace(char[] buf, int start, int len)
- Specified by:
ignorableWhitespace
in interfaceContentHandler
-
processingInstruction
public void processingInstruction(String target, String data)
- Specified by:
processingInstruction
in interfaceContentHandler
-
skippedEntity
public void skippedEntity(String name)
- Specified by:
skippedEntity
in interfaceContentHandler
-
-