joeq.Compiler.BytecodeAnalysis
Class Bytecodes.LDC

java.lang.Object
  extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
      extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.CPInstruction
          extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.LDC
All Implemented Interfaces:
Serializable, Cloneable, Bytecodes.ExceptionThrower, Bytecodes.PushInstruction, Bytecodes.StackProducer, Bytecodes.TypedInstruction
Direct Known Subclasses:
Bytecodes.LDC_W
Enclosing interface:
Bytecodes

public static class Bytecodes.LDC
extends Bytecodes.CPInstruction
implements Bytecodes.PushInstruction, Bytecodes.ExceptionThrower, Bytecodes.TypedInstruction

See Also:
Serialized Form

Field Summary
 
Fields inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.CPInstruction
index, o
 
Fields inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
length, opcode
 
Constructor Summary
Bytecodes.LDC(Object o)
           
 
Method Summary
 void accept(Bytecodes.Visitor v)
          Call corresponding visitor method(s).
 void dump(DataOutputStream out)
          Dump instruction as byte code to stream out.
 Set getExceptions()
           
 jq_Type getType()
           
 Object getValue()
           
protected  void initFromFile(jq_ConstantPool cp, jwutil.io.ByteSequence bytes, boolean wide)
          Read needed data (e.g.
 void setIndex(jq_ConstantPool.ConstantPoolRebuilder cpr)
          Set the index to constant pool and adjust size.
protected  void setSize()
           
 
Methods inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.CPInstruction
getIndex, getObject, setObject, toString, toString
 
Methods inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
consumeStack, copy, getLength, getOpcode, produceStack, readInstruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface joeq.Compiler.BytecodeAnalysis.Bytecodes.StackProducer
produceStack
 

Constructor Detail

Bytecodes.LDC

public Bytecodes.LDC(Object o)
Method Detail

setSize

protected final void setSize()

dump

public void dump(DataOutputStream out)
          throws IOException
Dump instruction as byte code to stream out.

Overrides:
dump in class Bytecodes.CPInstruction
Parameters:
out - Output stream
Throws:
IOException

setIndex

public final void setIndex(jq_ConstantPool.ConstantPoolRebuilder cpr)
Set the index to constant pool and adjust size.

Overrides:
setIndex in class Bytecodes.CPInstruction
Parameters:
cpr - constant pool rebuilder

initFromFile

protected void initFromFile(jq_ConstantPool cp,
                            jwutil.io.ByteSequence bytes,
                            boolean wide)
                     throws IOException
Read needed data (e.g. index) from file.

Overrides:
initFromFile in class Bytecodes.CPInstruction
Parameters:
cp - constant pool of class we are reading
bytes - input stream
wide - wide prefix?
Throws:
IOException

getValue

public Object getValue()

getType

public jq_Type getType()
Specified by:
getType in interface Bytecodes.TypedInstruction
Overrides:
getType in class Bytecodes.CPInstruction
Returns:
type related with this instruction.

getExceptions

public Set getExceptions()
Specified by:
getExceptions in interface Bytecodes.ExceptionThrower

accept

public void accept(Bytecodes.Visitor v)
Call corresponding visitor method(s). The order is: Call visitor methods of implemented interfaces first, then call methods according to the class hierarchy in descending order, i.e., the most specific visitXXX() call comes last.

Specified by:
accept in class Bytecodes.Instruction
Parameters:
v - Visitor object


Copyright © 2001-2008 John Whaley. All Rights Reserved.