dioscuri.module.cpu32
Class ClassFile
java.lang.Object
dioscuri.module.cpu32.ClassFile
public class ClassFile
- extends java.lang.Object
- Author:
- Bram Lohman, Bart Kiers
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PUBLIC
public static final short PUBLIC
- See Also:
- Constant Field Values
FINAL
public static final short FINAL
- See Also:
- Constant Field Values
SUPER
public static final short SUPER
- See Also:
- Constant Field Values
INTERFACE
public static final short INTERFACE
- See Also:
- Constant Field Values
ABSTRACT
public static final short ABSTRACT
- See Also:
- Constant Field Values
MAX_CONSTANT_POOL_SIZE
public static final int MAX_CONSTANT_POOL_SIZE
- See Also:
- Constant Field Values
ClassFile
public ClassFile()
read
public void read(java.io.DataInputStream in)
throws java.io.IOException
- Parameters:
in -
- Throws:
java.io.IOException
write
public void write(java.io.DataOutputStream out)
throws java.io.IOException
- Parameters:
out -
- Throws:
java.io.IOException
update
public void update()
getMethodNames
public java.lang.String[] getMethodNames()
- Returns:
- -
getMethodCode
public int[] getMethodCode(java.lang.String methodName)
- Parameters:
methodName -
- Returns:
- -
setMethodCode
public void setMethodCode(java.lang.String methodName,
int[] codeBytes)
- Parameters:
methodName - codeBytes -
setMethodCode
public void setMethodCode(java.lang.String methodName,
int[] codeBytes,
int codeBytesLength)
- Parameters:
methodName - codeBytes - codeBytesLength -
getMethodExceptionTable
public AttributeInfo.CodeAttribute.ExceptionEntry[] getMethodExceptionTable(java.lang.String methodName)
- Parameters:
methodName -
- Returns:
- -
setMethodExceptionTable
public void setMethodExceptionTable(java.lang.String methodName,
AttributeInfo.CodeAttribute.ExceptionEntry[] exceptionTable)
- Parameters:
methodName - exceptionTable -
setMethodExceptionTable
public void setMethodExceptionTable(java.lang.String methodName,
AttributeInfo.CodeAttribute.ExceptionEntry[] exceptionTable,
int exceptionTableLength)
- Parameters:
methodName - exceptionTable - exceptionTableLength -
getClassName
public java.lang.String getClassName()
- Returns:
- -
setClassName
public void setClassName(java.lang.String name)
- Parameters:
name -
addToConstantPool
public int addToConstantPool(java.lang.Object o)
- Parameters:
o -
- Returns:
- index into constant pool where value is stored
getMethodMaxStack
public int getMethodMaxStack(java.lang.String methodName)
- Parameters:
methodName -
- Returns:
- -
getMethodMaxLocals
public int getMethodMaxLocals(java.lang.String methodName)
- Parameters:
methodName -
- Returns:
- -
getConstantPoolFieldDescriptor
protected java.lang.String getConstantPoolFieldDescriptor(int index)
- Parameters:
index -
- Returns:
- -
getFieldLength
protected int getFieldLength(java.lang.String fieldDescriptor)
- Parameters:
fieldDescriptor -
- Returns:
- -
getConstantPoolUtf8
protected java.lang.String getConstantPoolUtf8(int index)
- Parameters:
index -
- Returns:
- -
getConstantPoolMethodDescriptor
protected java.lang.String getConstantPoolMethodDescriptor(int index)
- Parameters:
index -
- Returns:
- -
getMethodStackDelta
protected int getMethodStackDelta(java.lang.String methodDescriptor)
- Parameters:
methodDescriptor -
- Returns:
- stack delta caused by an invoke on this method descriptor -- delta
= within () - outside ()