org.jvnet.jaxbcommons.runtime.Discarder Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-01/24/2006 06:15 PM(kohsuke)-fcs
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2006.07.10 at 02:12:40 PM CEST
//
package org.jvnet.jaxbcommons.runtime;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
/**
* UnmarshallingEventHandler implementation that discards the whole sub-tree.
*
* @author
* Kohsuke Kawaguchi ([email protected])
*/
class Discarder implements UnmarshallingEventHandler {
private final UnmarshallingContext context;
// nest level of elements.
private int depth = 0;
public Discarder(UnmarshallingContext _ctxt) {
this.context = _ctxt;
}
public void enterAttribute(String uri, String local, String qname) throws SAXException {
}
public void enterElement(String uri, String local, String qname, Attributes atts) throws SAXException {
depth++;
}
public void leaveAttribute(String uri, String local, String qname) throws SAXException {
}
public void leaveElement(String uri, String local, String qname) throws SAXException {
depth--;
if(depth==0)
context.popContentHandler();
}
public Object owner() {
return null;
}
public void text(String s) throws SAXException {
}
public void leaveChild(int nextState) throws SAXException {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy