public class CodeAttribute extends ClassFileAttribute implements ICodeAttribute
NO_ATTRIBUTES| Modifier and Type | Method and Description |
|---|---|
IClassFileAttribute[] |
getAttributes()
Answer back the collection of all attributes of the field info.
|
int |
getAttributesCount()
Answer back the attribute number of the code attribute.
|
byte[] |
getBytecodes()
Answer back the array of bytes, which represents all the opcodes as described
in the JVM specifications.
|
long |
getCodeLength()
Answer back the length of the bytecode contents.
|
IExceptionTableEntry[] |
getExceptionTable()
Answer back the array of exception entries, if they are present.
|
int |
getExceptionTableLength()
Answer back the exception table length of the code attribute.
|
ILineNumberAttribute |
getLineNumberAttribute()
Answer back the line number attribute, if it exists, null otherwise.
|
ILocalVariableAttribute |
getLocalVariableAttribute()
Answer back the local variable attribute, if it exists, null otherwise.
|
int |
getMaxLocals()
Answer back the max locals value of the code attribute.
|
int |
getMaxStack()
Answer back the max stack value of the code attribute.
|
void |
traverse(IBytecodeVisitor visitor)
Define a Java opcodes walker.
|
getAttributeLength, getAttributeName, getAttributeNameIndexdoubleAt, floatAt, i1At, i2At, i4At, i8At, u1At, u2At, u4At, utf8Atclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttributeLength, getAttributeName, getAttributeNameIndexpublic IClassFileAttribute[] getAttributes()
ICodeAttributegetAttributes in interface ICodeAttributeICodeAttribute.getAttributes()public int getAttributesCount()
ICodeAttributegetAttributesCount in interface ICodeAttributeICodeAttribute.getAttributesCount()public byte[] getBytecodes()
ICodeAttributegetBytecodes in interface ICodeAttributeICodeAttribute.getBytecodes()public long getCodeLength()
ICodeAttributegetCodeLength in interface ICodeAttributeICodeAttribute.getCodeLength()public IExceptionTableEntry[] getExceptionTable()
ICodeAttributegetExceptionTable in interface ICodeAttributeICodeAttribute.getExceptionTable()public int getExceptionTableLength()
ICodeAttributegetExceptionTableLength in interface ICodeAttributeICodeAttribute.getExceptionTableLength()public ILineNumberAttribute getLineNumberAttribute()
ICodeAttributegetLineNumberAttribute in interface ICodeAttributeICodeAttribute.getLineNumberAttribute()public ILocalVariableAttribute getLocalVariableAttribute()
ICodeAttributegetLocalVariableAttribute in interface ICodeAttributeICodeAttribute.getLocalVariableAttribute()public int getMaxLocals()
ICodeAttributegetMaxLocals in interface ICodeAttributeICodeAttribute.getMaxLocals()public int getMaxStack()
ICodeAttributegetMaxStack in interface ICodeAttributeICodeAttribute.getMaxStack()public void traverse(IBytecodeVisitor visitor) throws ClassFormatException
ICodeAttributetraverse in interface ICodeAttributevisitor - The visitor to use to walk the opcodes.ClassFormatException - Exception thrown if the opcodes contain invalid bytesICodeAttribute.traverse(IBytecodeVisitor visitor)