Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Compil3r.BytecodeAnalysis
Class Bytecodes.CPInstruction  view Bytecodes.CPInstruction download Bytecodes.CPInstruction.java

java.lang.Object
  extended byCompil3r.BytecodeAnalysis.Bytecodes.Instruction
      extended byCompil3r.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


Field Summary
protected  char index
           
protected  java.lang.Object o
           
 
Fields inherited from class Compil3r.BytecodeAnalysis.Bytecodes.Instruction
length, opcode
 
Constructor Summary
(package private) Bytecodes.CPInstruction()
          Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction().
protected Bytecodes.CPInstruction(short opcode, java.lang.Object o)
           
 
Method Summary
 void dump(java.io.DataOutputStream out)
          Dump instruction as byte code to stream out.
 int getIndex()
           
 java.lang.Object getObject()
           
 Clazz.jq_Type getType()
           
protected  void initFromFile(Clazz.jq_ConstantPool cp, Util.IO.ByteSequence bytes, boolean wide)
          Read needed data (i.e., index) from file.
 void setIndex(Clazz.jq_ConstantPool.ConstantPoolRebuilder cpr)
          Set the index to constant pool.
 void setObject(java.lang.Object o)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 java.lang.String toString(boolean verbose)
          Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"< constant pool index>">"
 
Methods inherited from class Compil3r.BytecodeAnalysis.Bytecodes.Instruction
accept, consumeStack, copy, dispose, getLength, getOpcode, produceStack, readInstruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

o

protected java.lang.Object o

index

protected char index
Constructor Detail

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)
Method Detail

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