public class Instruction
extends java.lang.Object
implements java.lang.Cloneable
InstructionList
Constructor and Description |
---|
Instruction(byte[] bytes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Gets a named attribute.
|
byte[] |
getBytes()
Gets the bytes of this instruction.
|
protected short |
getOffset()
Gets the offset of this instruction.
|
byte |
getOpcode()
Gets the opcode of this Instruction.
|
int |
length()
Get the length of this instruction.
|
void |
setAttribute(java.lang.String name)
Sets a named attribute to this Instruction.
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets a named attribute to this Instruction.
|
protected void |
setBytes(byte[] bytes)
Set the bytes of this Instruction.
|
protected void |
setOffset(short offset)
Sets the offset of this instruction.
|
short |
stackConsumption()
Get the stack consumption of this Instruction.
|
short |
stackUsage()
Get the stack usage this Instruction uses.
|
java.lang.String |
toString() |
public Instruction(byte[] bytes)
bytes
- Byte array representing this instruction. May
not be null. Bytes must have at least one byte in it.java.lang.IllegalArgumentException
- is thrown, if byte[].length == 0NullpointerException
- is thrown, if byte[] == nullpublic java.lang.Object getAttribute(java.lang.String name)
public byte[] getBytes()
protected short getOffset()
public byte getOpcode()
public int length()
getBytes().length
public void setAttribute(java.lang.String name)
public void setAttribute(java.lang.String name, java.lang.Object value)
protected void setBytes(byte[] bytes)
bytes
- protected void setOffset(short offset)
public short stackConsumption()
public short stackUsage()
Some instructions may both consume and produce data on stack. This method returns the total usage after instruction has been executed.
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2001. Documenation generated October 18 2013.