|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.classfile.BaseAttributeParser
This class implements a parser for regular Java bytecode attributes as defined in the JVM specification.
| Constructor Summary | |
BaseAttributeParser()
|
|
| Method Summary | |
Attribute |
read(String tag,
DataInput in,
ConstantPool cp)
Checks the next attribute in the given input, in,
and parses it if it is recognized. |
Attribute |
readCodeInfoAttribute(String tag,
DataInput in,
ConstantPool cp,
Instruction[] insns)
Checks the next attribute in the given input, in,
and parses it if it is recognized, but only parses attributes
that may appear within a CodeInfo attribute. |
Attribute |
readInterfaceOnly(String tag,
DataInput in,
ConstantPool cp)
Checks the next attribute in the given input, in,
and parses it if it is recognized, but skips CodeInfo
attributes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BaseAttributeParser()
| Method Detail |
public Attribute read(String tag,
DataInput in,
ConstantPool cp)
throws IOException,
ClassFileFormatException
in,
and parses it if it is recognized.
read in interface AttributeParsertag - a String giving the name of the next attribute in
inin - an input stream for the bytecode ClassInfo being
parsed, whose read cursor is positioned just after the
attribute_name_index of the next attribute (see JVM2, 4.7)cp - the ConstantPool for the bytecode ClassInfo being parsed
Attribute value if the next bytes in
in represent an Attribute recognized by this, or
null if the next bytes are not recognized
IOException - if an error occurs while reading from
the bytecode file represented by in
ClassFileFormatException - if the next bytes begin
like a recognized Attribute but are then malformed
public Attribute readInterfaceOnly(String tag,
DataInput in,
ConstantPool cp)
throws IOException,
ClassFileFormatException
in,
and parses it if it is recognized, but skips CodeInfo
attributes.
readInterfaceOnly in interface AttributeParsertag - a String giving the name of the next attribute in
inin - an input stream for the bytecode ClassInfo being
parsed, whose read cursor is positioned just after the
attribute_name_index of the next attribute (see JVM2, 4.7)cp - the ConstantPool for the bytecode ClassInfo being parsed
Attribute value if the next bytes in
in represent an Attribute recognized by this, or
null if the next bytes are not recognized
IOException - if an error occurs while reading from
the bytecode file represented by in
ClassFileFormatException - if the next bytes begin
like a recognized Attribute but are then malformed
public Attribute readCodeInfoAttribute(String tag,
DataInput in,
ConstantPool cp,
Instruction[] insns)
throws IOException,
ClassFileFormatException
in,
and parses it if it is recognized, but only parses attributes
that may appear within a CodeInfo attribute.
readCodeInfoAttribute in interface AttributeParsertag - a String giving the name of the next attribute in
inin - an input stream for the bytecode ClassInfo being
parsed, whose read cursor is positioned just after the
attribute_name_index of the next attribute (see JVM2, 4.7)cp - the ConstantPool for the bytecode ClassInfo being parsedinsns - (sparse) array of instructions
Attribute value if the next bytes in
in represent an Attribute recognized by this, or
null if the next bytes are not recognized
IOException - if an error occurs while reading from
the bytecode file represented by in
ClassFileFormatException - if the next bytes begin
like a recognized Attribute but are then malformed or if the
next bytes are not valid within a CodeInfo attribute
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||