All Packages Class Hierarchy This Package Previous Next Index
Class BIT.highBIT.Routine
java.lang.Object
|
+----BIT.highBIT.Routine
- public class Routine
- extends Object
Contains information about a method within a Java .class file.
- See Also:
- ClassInfo, Method_Info
-
basic_blocks
- Bytecodes (code) broken into a number of basic blocks in an array.
-
classinfo
-
-
code
- Actual array containing the bytecodes.
-
code_length
-
Length of the code in bytes of this method.
-
constant_pool
-
-
descriptor
- Descriptor for this method.
-
instructions
- Bytecodes (code) broken into a number of instructions in an array.
-
max_locals
- Maximum number of locals for this method.
-
max_stack
-
Maximum stack size for this method.
-
method
-
Method information in classFile package.
-
method_name
-
Name of this method.
-
modified_basic_blocks
-
-
modified_instructions
-
This is the Vector to hold the modified code.
-
Routine(Method_Info, Cp_Info[], ClassInfo)
-
Creates a new Routine class which breaks down methods into
more easily manageble entities.
-
addAfter(String, String, Object)
-
-
addBefore(String, String, Object)
-
-
addConstantPoolEntry(Cp_Info)
-
-
adjInstrOffsets(int, int, boolean)
-
-
adjModifiedBasicBlocks(int, int, boolean)
- Modifies the modified_basic_block array so that it reflects changes in the
modified_instructions array.
-
adjOffsets(int, int, boolean)
-
-
existBasicBlockStart(int)
-
-
getAccessFlags()
- Returns this method's access flags.
-
getBasicBlockCount()
- Returns the number of basic blocks in this method.
-
getBasicBlocks()
- Returns the array of basic blocks.
-
getClassName()
-
-
getCode()
- Returns code buffer (actual bytecode) uninterpreted.
-
getCodeLength()
-
Returns the length of the code array (actual bytecode).
-
getConstantPool()
-
-
getDescriptor()
- Returns the descriptor of this method.
-
getInstruction(int)
-
-
getInstructionArray()
- Returns the InstructionArray.
-
getInstructionCount()
- Returns the number of instuctions in this method.
-
getInstructions()
- Returns the array of instructions.
-
getLineNumber(int)
-
-
getMaxLocals()
- Returns maximum number of locals for this method.
-
getMaxStack()
- Returns maximum stack size for this method.
-
getMethodName()
- Returns the name of this method.
-
getTempBasicBlock(int)
-
-
getTempBasicBlocks()
- Returns the vector of basic blocks.
-
getTempBasicBlockStart()
-
-
inBasicBlock(int)
- Returns index of basic block that contains (between start and end address) the
specified address.
-
indexInConstantPool(Cp_Info)
-
-
indexOfBasicBlock(int)
- Returns index of basic block that starts at specified start_address.
-
indexOfInstruction(int)
- Returns the index of instruction that starts at specified offset in code buffer.
-
isAbstract()
- Returns true if this method was declared to be abstract.
-
isFinal()
- Returns true if this method was declared to be final.
-
isNative()
- Returns true if this method was declared to be native.
-
isPrivate()
- Returns true if this method was declared to be private.
-
isProtected()
- Returns true if this method was declared to be protected.
-
isPublic()
- Returns true if this method was declared to be public.
-
isStatic()
- Returns true if this method was declared to be static.
-
isSynchronized()
- Returns true if this method was declared to be synchronized.
-
setConstantPool(Cp_Info[])
-
-
writeReady()
-
method
protected Method_Info method
- Method information in classFile package.
- See Also:
- Method_Info
classinfo
protected ClassInfo classinfo
method_name
protected String method_name
- Name of this method.
It gets filled in when the constructor is called.
One can read this value by calling getMethodName() method.
- See Also:
- getMethodName
descriptor
protected String descriptor
- Descriptor for this method.
It gets filled in when the constructor is called.
One can read this value calling getDescriptor() method.
- See Also:
- getDescriptor
max_stack
protected short max_stack
- Maximum stack size for this method.
It gets filled in when the constructor is called.
One can read this value by calling getMaxStack() method.
- See Also:
- getMaxStack
max_locals
protected short max_locals
- Maximum number of locals for this method.
It gets filled in when the constructor is called.
One can read this value by calling getMaxLocals() method.
- See Also:
- getMaxLocals
code_length
protected int code_length
- Length of the code in bytes of this method.
One can read this value by calling getCodeLength() method.
- See Also:
- getCodeLength
code
public byte code[]
- Actual array containing the bytecodes.
This is an array of byte that represent the bytecodes of this method.
One can read this value by calling getCode() method.
- See Also:
- getCode
instructions
public InstructionArray instructions
- Bytecodes (code) broken into a number of instructions in an array.
Each element in this array is a valid Java Virtual Machine
instruction. Each instruction contains the opcode and any
operands.
- See Also:
- Instruction, getInstructions, InstructionArray
modified_instructions
public Vector modified_instructions
- This is the Vector to hold the modified code.
basic_blocks
public BasicBlockArray basic_blocks
- Bytecodes (code) broken into a number of basic blocks in an array.
Each element in this array is a basic block having one entry point
and one exit point.
- See Also:
- BasicBlockArray, getBasicBlocks
modified_basic_blocks
public BasicBlockArray modified_basic_blocks
constant_pool
public Cp_Info constant_pool[]
Routine
public Routine(Method_Info method,
Cp_Info constant_pool[],
ClassInfo classinfo)
- Creates a new Routine class which breaks down methods into
more easily manageble entities.
The only attribute that it looks at is the "Code" attribute.
- Parameters:
- method - the method to be analyzed
- constant_pool - the constant pool for the .class file
- See Also:
- Method_Info, Cp_Info
getLineNumber
public int getLineNumber(int pc)
addBefore
public void addBefore(String classname,
String methodname,
Object arg)
addAfter
public void addAfter(String classname,
String methodname,
Object arg)
adjInstrOffsets
public void adjInstrOffsets(int start,
int size,
boolean before)
adjOffsets
public void adjOffsets(int start,
int size,
boolean before)
adjModifiedBasicBlocks
public void adjModifiedBasicBlocks(int affected_start,
int offset,
boolean before)
- Modifies the modified_basic_block array so that it reflects changes in the
modified_instructions array.
indexOfInstruction
public int indexOfInstruction(int offset)
- Returns the index of instruction that starts at specified offset in code buffer.
If not found, return -1.
existBasicBlockStart
public boolean existBasicBlockStart(int address)
indexOfBasicBlock
public int indexOfBasicBlock(int start_address)
- Returns index of basic block that starts at specified start_address.
If not found, return -1.
inBasicBlock
public int inBasicBlock(int address)
- Returns index of basic block that contains (between start and end address) the
specified address. Otherwise, return -1.
getInstruction
public Instruction getInstruction(int index)
getTempBasicBlock
public BasicBlock getTempBasicBlock(int index)
writeReady
public void writeReady()
getAccessFlags
public short getAccessFlags()
- Returns this method's access flags.
isPublic
public boolean isPublic()
- Returns true if this method was declared to be public.
isPrivate
public boolean isPrivate()
- Returns true if this method was declared to be private.
isProtected
public boolean isProtected()
- Returns true if this method was declared to be protected.
isStatic
public boolean isStatic()
- Returns true if this method was declared to be static.
isFinal
public boolean isFinal()
- Returns true if this method was declared to be final.
isSynchronized
public boolean isSynchronized()
- Returns true if this method was declared to be synchronized.
isNative
public boolean isNative()
- Returns true if this method was declared to be native.
isAbstract
public boolean isAbstract()
- Returns true if this method was declared to be abstract.
getMethodName
public String getMethodName()
- Returns the name of this method.
getDescriptor
public String getDescriptor()
- Returns the descriptor of this method.
getCodeLength
public int getCodeLength()
- Returns the length of the code array (actual bytecode).
getCode
public byte[] getCode()
- Returns code buffer (actual bytecode) uninterpreted.
getMaxStack
public short getMaxStack()
- Returns maximum stack size for this method.
getMaxLocals
public short getMaxLocals()
- Returns maximum number of locals for this method.
getInstructions
public Instruction[] getInstructions()
- Returns the array of instructions.
- See Also:
- Instruction
getInstructionArray
public InstructionArray getInstructionArray()
- Returns the InstructionArray.
- See Also:
- InstructionArray
getInstructionCount
public int getInstructionCount()
- Returns the number of instuctions in this method.
getBasicBlocks
public BasicBlockArray getBasicBlocks()
- Returns the array of basic blocks.
- See Also:
- BasicBlockArray
getTempBasicBlocks
public Vector getTempBasicBlocks()
- Returns the vector of basic blocks.
- See Also:
- Vector
getTempBasicBlockStart
public Vector getTempBasicBlockStart()
getBasicBlockCount
public int getBasicBlockCount()
- Returns the number of basic blocks in this method.
indexInConstantPool
public short indexInConstantPool(Cp_Info cp)
addConstantPoolEntry
public short addConstantPoolEntry(Cp_Info entry)
setConstantPool
public void setConstantPool(Cp_Info cps[])
getConstantPool
public Cp_Info[] getConstantPool()
getClassName
public String getClassName()
All Packages Class Hierarchy This Package Previous Next Index