Package com.sun.tools.xjc.util
Class SubtreeCutter
java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
com.sun.tools.xjc.util.SubtreeCutter
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,XMLFilter
,XMLReader
- Direct Known Subclasses:
AbstractExtensionBindingChecker
XMLFilter
that can cut sub-trees.- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
endElement
(String namespaceURI, String localName, String qName) boolean
void
setContentHandler
(ContentHandler handler) void
Starts cutting a sub-tree.void
void
startElement
(String uri, String localName, String qName, Attributes atts) Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
characters, endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
SubtreeCutter
public SubtreeCutter()
-
-
Method Details
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classXMLFilterImpl
- Throws:
SAXException
-
isCutting
public boolean isCutting() -
startCutting
public void startCutting()Starts cutting a sub-tree. Should be called from within thestartElement(String, String, String, Attributes)
implementation before the execution is passed tostartElement(String, String, String, Attributes)
. The current element will be cut. -
setContentHandler
- Specified by:
setContentHandler
in interfaceXMLReader
- Overrides:
setContentHandler
in classXMLFilterImpl
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classXMLFilterImpl
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classXMLFilterImpl
- Throws:
SAXException
-