|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfr.umlv.corosol.classfile.bytecode.impl.DefaultJBytecodeParser
public class DefaultJBytecodeParser
The default implementation of the bytecode parser JBytecodeParser.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
DefaultJBytecodeParser()
Creates a new bytecode parser not initialized with a bytecode array. |
|
| Method Summary | |
|---|---|
void |
fillInput(byte[] b,
int off,
int len)
Resets the bytecode parsing and initializes it with the len bytes of the specified bytes array, starting at the off position. |
java.lang.String |
getMnemonic()
Returns the mnemonic of the next instruction opcode read from this bytecode parser. |
int |
getOpcodeCount()
Calculates the number of times that this bytecode parser's nextOpcode method can be called before it generates an exception. |
int |
getOperandCount()
Returns the number of operands of the current instruction read with the nextOpcode method. |
int |
getPosition()
Returns the current opcode position in the bytecodes flow. |
boolean |
hasMoreOpcode()
Tests if there are more instruction opcode available from this bytecode parser. |
int |
nextOpcode()
Returns the next instruction opcode from this bytecode parser. |
int |
readOperands(byte[] b,
int off,
int len)
Reads up to len operand of the current instruction, read with the nextOpcode method, into an array of bytes. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultJBytecodeParser()
| Method Detail |
|---|
public boolean hasMoreOpcode()
hasMoreOpcode in interface JBytecodeParserpublic int nextOpcode()
nextOpcode in interface JBytecodeParserjava.util.NoSuchElementException - if there are no more
instruction opcode in this bytecode parserreadOperands(byte[], int, int)public java.lang.String getMnemonic()
getMnemonic in interface JBytecodeParserpublic int getPosition()
getPosition in interface JBytecodeParser
public int readOperands(byte[] b,
int off,
int len)
readOperands in interface JBytecodeParserb - the buffer into which the operands are read.off - the start offset in array b at which the operands
are writtenlen - the maximum number of operands to read
public int getOpcodeCount()
getOpcodeCount in interface JBytecodeParserpublic int getOperandCount()
getOperandCount in interface JBytecodeParser
public void fillInput(byte[] b,
int off,
int len)
fillInput in interface JBytecodeParserb - the bytecode of a methodoff - the start offset in array b at which the parsing is
processedlen - the maximum number of bytes to analyse
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||