|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--CodeIterator
Field Summary | |
(package private) byte[] |
code
the code array |
(package private) int |
nextIndex
the index into the 'code' array where the next instruction begins. |
(package private) int |
opcode
the current opcode. |
(package private) int |
opcodeIndex
the index into the 'code' array where we find the current opcode. |
(package private) int |
operandIndex
the index into the 'code' array where we find the first operand. |
(package private) ConstantPool |
pool
the constant pool of my class. |
(package private) boolean |
wide
a flag telling that the current opcode is wide-modified. |
Constructor Summary | |
(package private) |
CodeIterator(byte[] code,
ConstantPool pool)
make a code iterator that traverses a given array of bytecodes. |
Method Summary | |
(package private) java.lang.String |
disassemble()
disassemble the current instruction. |
(package private) int |
getSignedInteger(int offset,
int size)
get a variable-length signed integer from the code array. |
(package private) int |
getUnsignedInteger(int offset,
int size)
get a variable-length unsigned integer from the code array. |
(package private) boolean |
iterate()
go to the next instruction. |
(package private) CodeIterator |
makeChild(int target)
construct a new iterator, starting at the given target index. |
(package private) java.lang.String |
stringFilter(java.lang.String s)
get an abbreviated, one-line version of a string without any dangerous characters, suitable for disassembled arguments. |
(package private) boolean |
toTarget(int target)
go to a given instruction. |
Methods inherited from class java.lang.Object |
|
Field Detail |
byte[] code
ConstantPool pool
boolean wide
int opcode
int opcodeIndex
int operandIndex
int nextIndex
Constructor Detail |
CodeIterator(byte[] code, ConstantPool pool)
Method Detail |
boolean iterate()
boolean toTarget(int target)
target
- the index of the target op-code.CodeIterator makeChild(int target)
target
- the index of the target op-code.java.lang.String disassemble()
int getUnsignedInteger(int offset, int size)
offset
- the offset of the integer's first byte from the
first operand position of the current instruction.size
- the length of the integer in bytes.int getSignedInteger(int offset, int size)
offset
- the offset of the integer's first byte from the
first operand position of the current instruction.size
- the length of the integer in bytes.java.lang.String stringFilter(java.lang.String s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |