|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.classfile.UniverseAttributeParser
This class implements an attribute parser that recognizes the JUTS attributes. The parser is inserted into the attribute parsing chain of responsibility.
AttributeList.addParser(AttributeParser)| Field Summary | |
private static int |
firstInterestingPos
|
private static String |
tagPrefix
the prefix of all names of attributes this parser may recognize |
| Constructor Summary | |
UniverseAttributeParser()
|
|
| Method Summary | |
private boolean |
isOurs(String tag)
|
Attribute |
read(String tag,
DataInput in,
ConstantPool cp)
Checks the next attribute in the given input stream, and parses it if is is recognized. |
Attribute |
readCodeInfoAttribute(String tag,
DataInput in,
ConstantPool cp,
Instruction[] insns)
Checks the next attribute in the given input stream, and parses it if is 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 stream, and parses it if is is recognized, but skips CodeInfo attributes Returns an Attribute instance if the attribute is recognized, or null otherwise. |
| 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 UniverseAttributeParser()
| Method Detail |
public Attribute read(String tag,
DataInput in,
ConstantPool cp)
throws IOException,
ClassFileFormatException
read in interface AttributeParsertag - a String giving the name of the next attributein - the input stream for the the bytecode ClassInfo being
parsed whose read cursor is positioned just after
attribute_name_index of the next attribute (VMS 4.7)cp - the constant pool for the 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 - an IO error has occurred
ClassFileFormatException - the class file is malformed
public Attribute readInterfaceOnly(String tag,
DataInput in,
ConstantPool cp)
throws IOException,
ClassFileFormatException
readInterfaceOnly in interface AttributeParsertag - a String giving the name of the next attributein - the input stream for the the bytecode ClassInfo being
parsed whose read cursor is positioned just after
attribute_name_index of the next attribute (VMS 4.7)cp - the constant pool for the 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 - an IO error has occurred
ClassFileFormatException - the class file is malformed
public Attribute readCodeInfoAttribute(String tag,
DataInput in,
ConstantPool cp,
Instruction[] insns)
throws IOException,
ClassFileFormatException
readCodeInfoAttribute in interface AttributeParsertag - a String giving the name of the next attributein - the input stream for the the bytecode ClassInfo being
parsed whose read cursor is positioned just after
attribute_name_index of the next attribute (VMS 4.7)cp - the constant pool for the 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 - an IO error has occurred
ClassFileFormatException - the class file is malformed private boolean isOurs(String tag)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||