java.lang.Object
Compil3r.BytecodeAnalysis.Bytecodes.Instruction
Compil3r.BytecodeAnalysis.Bytecodes.CPInstruction
- All Implemented Interfaces:
- Bytecodes.TypedInstruction, java.lang.Cloneable, java.io.Serializable
- Direct Known Subclasses:
- Bytecodes.ANEWARRAY, Bytecodes.CHECKCAST, Bytecodes.FieldOrMethod, Bytecodes.INSTANCEOF, Bytecodes.LDC, Bytecodes.LDC2_W, Bytecodes.MULTIANEWARRAY, Bytecodes.NEW
- Enclosing class:
- Bytecodes
- public abstract static class Bytecodes.CPInstruction
- extends Bytecodes.Instruction
- implements Bytecodes.TypedInstruction
o
protected java.lang.Object o
index
protected char index
Bytecodes.CPInstruction
Bytecodes.CPInstruction()
- Empty constructor needed for the Class.newInstance() statement in
Instruction.readInstruction(). Not to be used otherwise.
Bytecodes.CPInstruction
protected Bytecodes.CPInstruction(short opcode,
java.lang.Object o)
dump
public void dump(java.io.DataOutputStream out)
throws java.io.IOException
- Dump instruction as byte code to stream out.
- Overrides:
dump in class Bytecodes.Instruction
toString
public java.lang.String toString(boolean verbose)
- Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")" "<"< constant pool index>">"
- Overrides:
toString in class Bytecodes.Instruction
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null, string concatenation will instead
use "null".
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode()).
- Overrides:
toString in class Bytecodes.Instruction
initFromFile
protected void initFromFile(Clazz.jq_ConstantPool cp,
Util.IO.ByteSequence bytes,
boolean wide)
throws java.io.IOException
- Read needed data (i.e., index) from file.
- Overrides:
initFromFile in class Bytecodes.Instruction
getIndex
public final int getIndex()
setIndex
public void setIndex(Clazz.jq_ConstantPool.ConstantPoolRebuilder cpr)
- Set the index to constant pool.
getObject
public java.lang.Object getObject()
setObject
public void setObject(java.lang.Object o)
getType
public Clazz.jq_Type getType()
- Specified by:
getType in interface Bytecodes.TypedInstruction