|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.objectweb.asm.xml.ASMContentHandler
public class ASMContentHandler
A ContentHandler
that transforms XML
document into Java class file. This class can be feeded by any kind of SAX
2.0 event producers, e.g. XML parser, XSLT or XPath engines, or custom code.
SAXClassAdapter
,
Processor
Nested Class Summary | |
---|---|
protected class |
ASMContentHandler.Rule
Rule |
Field Summary | |
---|---|
protected ClassVisitor |
cv
Current instance of the ClassVisitor used to visit
classfile bytecode. |
protected Map<Object,Label> |
labels
Map of the active Label instances for current method. |
Constructor Summary | |
---|---|
ASMContentHandler(ClassVisitor cv)
Constructs a new ASMContentHandler object. |
Method Summary | |
---|---|
void |
endElement(String ns,
String lName,
String qName)
Process notification of the end of an XML element being reached. |
void |
startElement(String ns,
String lName,
String qName,
Attributes list)
Process notification of the start of an XML element being reached. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ClassVisitor cv
ClassVisitor
used to visit
classfile bytecode.
protected Map<Object,Label> labels
Label
instances for current method.
Constructor Detail |
---|
public ASMContentHandler(ClassVisitor cv)
ASMContentHandler
object.
cv
- class visitor that will be called to reconstruct the classfile
using the XML stream.Method Detail |
---|
public final void startElement(String ns, String lName, String qName, Attributes list) throws SAXException
startElement
in interface ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
ns
- - The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace processing is not being
performed.lName
- - The local name (without prefix), or the empty string if
Namespace processing is not being performed.qName
- - The qualified name (with prefix), or the empty string if
qualified names are not available.list
- - The attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.
SAXException
- if a parsing error is to be reportedpublic final void endElement(String ns, String lName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
ns
- - The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace processing is not being
performed.lName
- - The local name (without prefix), or the empty string if
Namespace processing is not being performed.qName
- - The qualified XML 1.0 name (with prefix), or the empty
string if qualified names are not available.
SAXException
- if a parsing error is to be reported
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |