|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.classfile.MJAttributeParser
This class implements a parser for the additional bytecode attributes defined in the MultiJava language specification.
| Field Summary | |
private static int |
firstInterestingPos
|
private static String |
tagPrefix
|
| Constructor Summary | |
MJAttributeParser()
|
|
| Method Summary | |
private boolean |
isOurs(String tag)
Returns true if the attribute named by the given tag String is an attribute of org.multijava. |
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 |
| Field Detail |
private static final String tagPrefix
private static final int firstInterestingPos
| Constructor Detail |
public MJAttributeParser()
| 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 private boolean isOurs(String tag)
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||