joeq.Compiler.BytecodeAnalysis
Class Bytecodes.CPInstruction
java.lang.Object
joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
joeq.Compiler.BytecodeAnalysis.Bytecodes.CPInstruction
- All Implemented Interfaces:
- Serializable, Cloneable, Bytecodes.TypedInstruction
- Direct Known Subclasses:
- Bytecodes.ANEWARRAY, Bytecodes.CHECKCAST, Bytecodes.FieldOrMethod, Bytecodes.INSTANCEOF, Bytecodes.LDC, Bytecodes.LDC2_W, Bytecodes.MULTIANEWARRAY, Bytecodes.NEW
- Enclosing interface:
- Bytecodes
public abstract static class Bytecodes.CPInstruction
- extends Bytecodes.Instruction
- implements Bytecodes.TypedInstruction
- See Also:
- Serialized Form
o
protected Object o
index
protected char index
Bytecodes.CPInstruction
protected Bytecodes.CPInstruction(short opcode,
Object o)
- Parameters:
opcode
- instruction opcodeo
- referred to in constant pool
dump
public void dump(DataOutputStream out)
throws IOException
- Dump instruction as byte code to stream out.
- Overrides:
dump
in class Bytecodes.Instruction
- Parameters:
out
- Output stream
- Throws:
IOException
toString
public String toString(boolean verbose)
- Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")" "<"< constant pool index>">"
- Overrides:
toString
in class Bytecodes.Instruction
- Parameters:
verbose
- long/short format switch
- Returns:
- mnemonic for instruction
toString
public String toString()
- Overrides:
toString
in class Bytecodes.Instruction
- Returns:
- mnemonic for instruction with symbolic references resolved
initFromFile
protected void initFromFile(jq_ConstantPool cp,
jwutil.io.ByteSequence bytes,
boolean wide)
throws IOException
- Read needed data (i.e., index) from file.
- Overrides:
initFromFile
in class Bytecodes.Instruction
- Parameters:
bytes
- input streamwide
- wide prefix?cp
- constant pool of class we are reading
- Throws:
IOException
getIndex
public final int getIndex()
- Returns:
- index in constant pool referred by this instruction.
setIndex
public void setIndex(jq_ConstantPool.ConstantPoolRebuilder cpr)
- Set the index to constant pool.
- Parameters:
cpr
- constant pool rebuilder
getObject
public Object getObject()
setObject
public void setObject(Object o)
getType
public jq_Type getType()
- Specified by:
getType
in interface Bytecodes.TypedInstruction
- Returns:
- type related with this instruction.
Copyright © 2001-2008 John Whaley. All Rights Reserved.