de.fub.bytecode.generic
Class LDC

java.lang.Object
  |
  +--de.fub.bytecode.generic.Instruction
        |
        +--de.fub.bytecode.generic.CPInstruction
              |
              +--de.fub.bytecode.generic.LDC
Direct Known Subclasses:
LDC_W

public class LDC
extends CPInstruction
implements PushInstruction, ExceptionThrower

LDC - Push item from constant pool

Stack: ... -> ..., item.word1, item.word2

Version:
$Id: LDC.java,v 1.6 1999/09/09 07:42:55 dahm Exp $
Author:
M. Dahm
See Also:
Serialized Form

Fields inherited from class de.fub.bytecode.generic.CPInstruction
index
 
Fields inherited from class de.fub.bytecode.generic.Instruction
length, tag
 
Constructor Summary
LDC(int index)
           
 
Method Summary
 void dump(java.io.DataOutputStream out)
          Dump instruction as byte code to stream out.
 java.lang.Class[] getExceptions()
           
 Type getType(ConstantPoolGen cpg)
           
protected  void initFromFile(ByteSequence bytes, boolean wide)
          Read needed data (e.g.
 void setIndex(int index)
          Set the index to constant pool and adjust size.
protected  void setSize()
           
 
Methods inherited from class de.fub.bytecode.generic.CPInstruction
getIndex, toString, toString
 
Methods inherited from class de.fub.bytecode.generic.Instruction
consumeStack, consumeStack, copy, getLength, getTag, produceStack, produceStack, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDC

public LDC(int index)
Method Detail

setSize

protected final void setSize()

dump

public void dump(java.io.DataOutputStream out)
          throws java.io.IOException
Dump instruction as byte code to stream out.
Parameters:
out - Output stream
Overrides:
dump in class CPInstruction

setIndex

public final void setIndex(int index)
Set the index to constant pool and adjust size.
Overrides:
setIndex in class CPInstruction

initFromFile

protected void initFromFile(ByteSequence bytes,
                            boolean wide)
                     throws java.io.IOException
Read needed data (e.g. index) from file.
Overrides:
initFromFile in class CPInstruction

getType

public Type getType(ConstantPoolGen cpg)
Overrides:
getType in class CPInstruction

getExceptions

public java.lang.Class[] getExceptions()
Specified by:
getExceptions in interface ExceptionThrower