| java.lang.Object org.xml.sax.helpers.DefaultHandler org.ejb3unit.asm.xml.ASMContentHandler
Inner Class :abstract protected class Rule | |
Field Summary | |
final static HashMap | OPCODES | protected boolean | computeMax true if the maximum stack size and number of local variables
must be automatically computed. | protected ClassWriter | cw Current instance of the
ClassWriter ClassWriter used to write
class bytecode. | protected HashMap | labels Map of the active
Label Label instances for current method. | protected OutputStream | os Output stream to write result bytecode. |
Method Summary | |
final public void | endDocument() Process notification of the end of a document and write generated
bytecode into output stream. | final public void | endElement(String ns, String lName, String qName) Process notification of the end of an XML element being reached. | final Object | peek() Return the top object on the stack without removing it. | final Object | pop() Pop the top object off of the stack, and return it. | final void | push(Object object) Push a new object onto the top of the object stack. | final public void | startElement(String ns, String lName, String qName, Attributes list) Process notification of the start of an XML element being reached.
Parameters: ns - - The Namespace URI, or the empty string if the element has noNamespace URI or if Namespace processing is not being performed. Parameters: lName - - The local name (without prefix), or the empty string ifNamespace processing is not being performed. Parameters: qName - - The qualified name (with prefix), or the empty string ifqualified names are not available. Parameters: list - - The attributes attached to the element. | public byte[] | toByteArray() Returns the bytecode of the class that was build with underneath class
writer. |
OPCODES | final static HashMap OPCODES(Code) | | Map of the opcode names to opcode and opcode group
|
computeMax | protected boolean computeMax(Code) | | true if the maximum stack size and number of local variables
must be automatically computed.
|
labels | protected HashMap labels(Code) | | Map of the active
Label Label instances for current method.
|
ASMContentHandler | public ASMContentHandler(OutputStream os, boolean computeMax)(Code) | | Constructs a new
ASMContentHandler ASMContentHandler object.
Parameters: os - output stream to write generated class. Parameters: computeMax - true if the maximum stack size and themaximum number of local variables must be automatically computed.This value is passed to ClassWriter ClassWriter instance. |
endDocument | final public void endDocument() throws SAXException(Code) | | Process notification of the end of a document and write generated
bytecode into output stream.
exception: SAXException - if parsing or writing error is to be reported. |
endElement | final public void endElement(String ns, String lName, String qName) throws SAXException(Code) | | Process notification of the end of an XML element being reached.
Parameters: ns - - The Namespace URI, or the empty string if the element has noNamespace URI or if Namespace processing is not being performed. Parameters: lName - - The local name (without prefix), or the empty string ifNamespace processing is not being performed. Parameters: qName - - The qualified XML 1.0 name (with prefix), or the emptystring if qualified names are not available. exception: SAXException - if a parsing error is to be reported |
peek | final Object peek()(Code) | | Return the top object on the stack without removing it. If there are no
objects on the stack, return null .
the top object on the stack without removing it. |
pop | final Object pop()(Code) | | Pop the top object off of the stack, and return it. If there are no
objects on the stack, return null .
the top object off of the stack. |
push | final void push(Object object)(Code) | | Push a new object onto the top of the object stack.
Parameters: object - The new object |
startElement | final public void startElement(String ns, String lName, String qName, Attributes list) throws SAXException(Code) | | Process notification of the start of an XML element being reached.
Parameters: ns - - The Namespace URI, or the empty string if the element has noNamespace URI or if Namespace processing is not being performed. Parameters: lName - - The local name (without prefix), or the empty string ifNamespace processing is not being performed. Parameters: qName - - The qualified name (with prefix), or the empty string ifqualified names are not available. Parameters: list - - The attributes attached to the element. If there are noattributes, it shall be an empty Attributes object. exception: SAXException - if a parsing error is to be reported |
toByteArray | public byte[] toByteArray()(Code) | | Returns the bytecode of the class that was build with underneath class
writer.
the bytecode of the class that was build with underneath classwriter or null if there are no classwriter created. |
Methods inherited from org.xml.sax.helpers.DefaultHandler | public void characters(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void endDocument() throws SAXException(Code)(Java Doc) public void endElement(String uri, String localName, String qName) throws SAXException(Code)(Java Doc) public void endPrefixMapping(String prefix) throws SAXException(Code)(Java Doc) public void error(SAXParseException e) throws SAXException(Code)(Java Doc) public void fatalError(SAXParseException e) throws SAXException(Code)(Java Doc) public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void notationDecl(String name, String publicId, String systemId) throws SAXException(Code)(Java Doc) public void processingInstruction(String target, String data) throws SAXException(Code)(Java Doc) public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException(Code)(Java Doc) public void setDocumentLocator(Locator locator)(Code)(Java Doc) public void skippedEntity(String name) throws SAXException(Code)(Java Doc) public void startDocument() throws SAXException(Code)(Java Doc) public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException(Code)(Java Doc) public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)(Java Doc) public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException(Code)(Java Doc) public void warning(SAXParseException e) throws SAXException(Code)(Java Doc)
|
|
|