Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

CPInstruction Class Reference

Inheritance diagram for CPInstruction:
[legend]
Collaboration diagram for CPInstruction:
[legend]
List of all members.

Public Methods

void dump (DataOutputStream out) throws IOException
final int getIndex ()
Type getType (ConstantPoolGen cpg)
void setIndex (int index)
String toString (ConstantPool cp)
String toString (boolean verbose)
void dump (DataOutputStream out) throws IOException
final int getIndex ()
Type getType (ConstantPoolGen cpg)
void setIndex (int index)
String toString (ConstantPool cp)
String toString (boolean verbose)

Protected Methods

 CPInstruction (short tag, int index)
void initFromFile (ByteSequence bytes, boolean wide) throws IOException
 CPInstruction (short tag, int index)
void initFromFile (ByteSequence bytes, boolean wide) throws IOException

Protected Attributes

int index

Private Methods

 CPInstruction ()
 CPInstruction ()

Detailed Description

Abstract super class for instructions that use an index into the constant pool such as LDC, INVOKEVIRTUAL, etc.

See also:
ConstantPoolGen , LDC , INVOKEVIRTUAL
Version:
Id:
CPInstruction.java,v 1.1.1.1 2002/01/24 03:44:06 pserver Exp
Author:
M. Dahm

Definition at line 19 of file lib/jpf/de/fub/bytecode/generic/CPInstruction.java.


Constructor & Destructor Documentation

CPInstruction::CPInstruction   [inline, private]
 

Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). Not to be used otherwise.

Definition at line 26 of file lib/jpf/de/fub/bytecode/generic/CPInstruction.java.

CPInstruction::CPInstruction short   tag,
int   index
[inline, protected]
 

Parameters:
index   to constant pool

Definition at line 30 of file lib/jpf/de/fub/bytecode/generic/CPInstruction.java.

CPInstruction::CPInstruction   [inline, private]
 

Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). Not to be used otherwise.

Definition at line 28 of file src/de/fub/bytecode/generic/CPInstruction.java.

CPInstruction::CPInstruction short   tag,
int   index
[inline, protected]
 

Parameters:
index   to constant pool

Definition at line 32 of file src/de/fub/bytecode/generic/CPInstruction.java.


Member Function Documentation

void CPInstruction::dump DataOutputStream   out [inline]
 

Dump instruction as byte code to stream out.

Parameters:
out   Output stream

Reimplemented from Instruction.

Reimplemented in FieldOrMethod, INVOKEINTERFACE, LDC, MULTIANEWARRAY, FieldOrMethod, INVOKEINTERFACE, LDC, and MULTIANEWARRAY.

Definition at line 40 of file src/de/fub/bytecode/generic/CPInstruction.java.

void CPInstruction::dump DataOutputStream   out [inline]
 

Dump instruction as byte code to stream out.

Parameters:
out   Output stream

Reimplemented from Instruction.

Reimplemented in FieldOrMethod, INVOKEINTERFACE, LDC, MULTIANEWARRAY, FieldOrMethod, INVOKEINTERFACE, LDC, and MULTIANEWARRAY.

Definition at line 38 of file lib/jpf/de/fub/bytecode/generic/CPInstruction.java.

final int CPInstruction::getIndex   [inline]
 

Returns:
index in constant pool referred by this instruction.

Reimplemented from IndexedInstruction.

Definition at line 47 of file src/de/fub/bytecode/generic/CPInstruction.java.

final int CPInstruction::getIndex   [inline]
 

Returns:
index in constant pool referred by this instruction.

Reimplemented from IndexedInstruction.

Definition at line 45 of file lib/jpf/de/fub/bytecode/generic/CPInstruction.java.

Type CPInstruction::getType ConstantPoolGen   cpg [inline]
 

Returns:
type related with this instruction.

Reimplemented from TypedInstruction.

Reimplemented in FieldInstruction, InvokeInstruction, LDC, LDC2_W, FieldInstruction, InvokeInstruction, LDC, and LDC2_W.

Definition at line 50 of file src/de/fub/bytecode/generic/CPInstruction.java.

Type CPInstruction::getType ConstantPoolGen   cpg [inline]
 

Returns:
type related with this instruction.

Reimplemented from TypedInstruction.

Reimplemented in FieldInstruction, InvokeInstruction, LDC, LDC2_W, FieldInstruction, InvokeInstruction, LDC, and LDC2_W.

Definition at line 48 of file lib/jpf/de/fub/bytecode/generic/CPInstruction.java.

Referenced by FieldInstruction::getFieldSize().

void CPInstruction::initFromFile ByteSequence   bytes,
boolean   wide
[inline, protected]
 

Read needed data (i.e., index) from file.

Parameters:
bytes   input stream
wide   wide prefix?

Reimplemented from Instruction.

Reimplemented in INVOKEINTERFACE, LDC, LDC_W, MULTIANEWARRAY, INVOKEINTERFACE, LDC, LDC_W, and MULTIANEWARRAY.

Definition at line 64 of file src/de/fub/bytecode/generic/CPInstruction.java.

void CPInstruction::initFromFile ByteSequence   bytes,
boolean   wide
[inline, protected]
 

Read needed data (i.e. index) from file.

Reimplemented from Instruction.

Reimplemented in INVOKEINTERFACE, LDC, LDC_W, MULTIANEWARRAY, INVOKEINTERFACE, LDC, LDC_W, and MULTIANEWARRAY.

Definition at line 60 of file lib/jpf/de/fub/bytecode/generic/CPInstruction.java.

void CPInstruction::setIndex int   index [inline]
 

Set the index to constant pool.

Parameters:
index   in constant pool.

Reimplemented from IndexedInstruction.

Reimplemented in LDC, and LDC.

Definition at line 74 of file src/de/fub/bytecode/generic/CPInstruction.java.

void CPInstruction::setIndex int   index [inline]
 

Set the index to constant pool.

Reimplemented from IndexedInstruction.

Reimplemented in LDC, and LDC.

Definition at line 69 of file lib/jpf/de/fub/bytecode/generic/CPInstruction.java.

String CPInstruction::toString boolean   verbose [inline]
 

Long output format:

<name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"< constant pool index>">"

Parameters:
verbose   long/short format switch
Returns:
mnemonic for instruction

Reimplemented from Instruction.

Reimplemented in MULTIANEWARRAY, and MULTIANEWARRAY.

Definition at line 101 of file src/de/fub/bytecode/generic/CPInstruction.java.

String CPInstruction::toString ConstantPool   cp [inline]
 

Returns:
mnemonic for instruction with symbolic references resolved

Reimplemented from Instruction.

Reimplemented in FieldInstruction, InvokeInstruction, INVOKEINTERFACE, MULTIANEWARRAY, FieldInstruction, InvokeInstruction, INVOKEINTERFACE, and MULTIANEWARRAY.

Definition at line 83 of file src/de/fub/bytecode/generic/CPInstruction.java.

String CPInstruction::toString boolean   verbose [inline]
 

Long output format:

<name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"< constant pool index>">"

Parameters:
verbose   long/short format switch
Returns:
mnemonic for instruction

Reimplemented from Instruction.

Reimplemented in MULTIANEWARRAY, and MULTIANEWARRAY.

Definition at line 96 of file lib/jpf/de/fub/bytecode/generic/CPInstruction.java.

String CPInstruction::toString ConstantPool   cp [inline]
 

Returns:
mnemonic for instruction with symbolic references resolved

Reimplemented from Instruction.

Reimplemented in FieldInstruction, InvokeInstruction, INVOKEINTERFACE, MULTIANEWARRAY, FieldInstruction, InvokeInstruction, INVOKEINTERFACE, and MULTIANEWARRAY.

Definition at line 78 of file lib/jpf/de/fub/bytecode/generic/CPInstruction.java.


The documentation for this class was generated from the following files:
Generated at Thu Feb 7 07:08:00 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001