|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.objectwave.classFile.AttributeInfo
|
+--com.objectwave.classFile.CodeAttributeInfo
A specific attribute info.
ClassFile| Constructor Summary | |
CodeAttributeInfo()
|
|
CodeAttributeInfo(ConstantPoolInfo newName,
byte[] newData)
|
|
| Method Summary | |
void |
addCalledMethods(java.util.Vector result,
ConstantPoolInfo[] pool)
|
void |
adjustExceptionTable(short increase)
|
protected void |
displayCode(java.lang.StringBuffer buff,
ConstantPoolInfo[] pool)
Only called by the MethodInfo class if the System parameter of ow.showAttributes is set to non-null. |
protected void |
fixUpCode(ClassFile target,
ConstantPoolInfo[] originalPool)
If this method is copied into another class, it may become necessary to fix up all references to the constants in the original pool. |
protected void |
fixUpConstants(ClassFile target,
ConstantPoolInfo[] originalPool)
|
ConstantPoolInfo[] |
getCatchTypes(ConstantPoolInfo[] pool)
Null values in the resulting array are legal. |
java.lang.String |
getLocalVar(int idx)
If there is a local var table, find the local var at the index. |
protected int |
handleLookupSwitch(int opCode,
byte[] data,
int idx,
java.lang.StringBuffer buff)
The lookupswith opcode has a variable length of data. |
static void |
hexDump(byte[] bytes,
int read,
java.io.Writer writer)
This method will print a hex dump of the given byte array to the given output stream. |
boolean |
read(java.io.DataInputStream di,
ConstantPoolInfo[] pool)
Code_attribute { u2 attribute_name_index; u4 attribute_length; u2 max_stack; u2 max_locals; u4 code_length; u1 code[code_length]; u2 exception_table_length; { u2 start_pc; u2 end_pc; u2 handler_pc; u2 catch_type; } exception_table[exception_table_length]; u2 attributes_count; attribute_info attributes[attributes_count]; |
protected void |
readCodeAttributes(ConstantPoolInfo[] pool)
Optional code attributes. |
java.lang.String |
toString(ConstantPoolInfo[] pool)
Print out an 'intelligent' version of this class. |
void |
write(java.io.DataOutputStream dos,
ConstantPoolInfo[] pool)
Write the bytes to the output stream. |
| Methods inherited from class com.objectwave.classFile.AttributeInfo |
toBoolean, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CodeAttributeInfo()
public CodeAttributeInfo(ConstantPoolInfo newName,
byte[] newData)
| Method Detail |
protected void fixUpConstants(ClassFile target,
ConstantPoolInfo[] originalPool)
throws java.lang.Exception
fixUpConstants in class AttributeInfotarget - originalPool -
java.lang.Exception
protected void fixUpCode(ClassFile target,
ConstantPoolInfo[] originalPool)
throws java.lang.Exception
java.lang.Exceptionpublic void adjustExceptionTable(short increase)
public ConstantPoolInfo[] getCatchTypes(ConstantPoolInfo[] pool)
public boolean read(java.io.DataInputStream di,
ConstantPoolInfo[] pool)
throws java.io.IOException
read in class AttributeInfodi - pool -
java.io.IOException
protected void readCodeAttributes(ConstantPoolInfo[] pool)
throws java.io.IOException
java.io.IOException
public void write(java.io.DataOutputStream dos,
ConstantPoolInfo[] pool)
throws java.io.IOException,
java.lang.Exception
write in class AttributeInfodos - The DataOutputStream upon which this is writingpool - The constant pool in which to index.
java.io.IOException
java.lang.Exceptionpublic java.lang.String getLocalVar(int idx)
public java.lang.String toString(ConstantPoolInfo[] pool)
AttributeInfo
toString in class AttributeInfopool -
public void addCalledMethods(java.util.Vector result,
ConstantPoolInfo[] pool)
protected void displayCode(java.lang.StringBuffer buff,
ConstantPoolInfo[] pool)
buff - The buffer upon which information is being written.pool - ConstantPoolInfo [] The constant pool containing strings, classes, etc...
protected int handleLookupSwitch(int opCode,
byte[] data,
int idx,
java.lang.StringBuffer buff)
public static void hexDump(byte[] bytes,
int read,
java.io.Writer writer)
throws java.io.IOException
bytes - the byte array to writewriter - the destination for the output.
java.io.IOException - thrown if there's an error writing strings to the writer.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||