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

Select Class Reference

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

Public Methods

boolean containsTarget (InstructionHandle ih)
void dump (DataOutputStream out) throws IOException
int[] getIndices ()
int[] getMatchs ()
InstructionHandle[] getTargets ()
void setTarget (int i, InstructionHandle target)
String toString (boolean verbose)
void updateTarget (InstructionHandle old_ih, InstructionHandle new_ih)
boolean containsTarget (InstructionHandle ih)
void dump (DataOutputStream out) throws IOException
int[] getIndices ()
int[] getMatchs ()
InstructionHandle[] getTargets ()
void setTarget (int i, InstructionHandle target)
String toString (boolean verbose)
void updateTarget (InstructionHandle old_ih, InstructionHandle new_ih)

Protected Methods

void initFromFile (ByteSequence bytes, boolean wide) throws IOException
int updatePosition (int offset, int max_offset)
void initFromFile (ByteSequence bytes, boolean wide) throws IOException
int updatePosition (int offset, int max_offset)

Protected Attributes

int[] match
int[] indices
InstructionHandle[] targets
int fixed_length
int match_length
int padding = 0
int[] match
int[] indices
InstructionHandle[] targets

Private Methods

 Select ()
 Select (short tag, int[] match, InstructionHandle[] targets, InstructionHandle target)
void dispose ()
 Select ()
 Select (short tag, int[] match, InstructionHandle[] targets, InstructionHandle target)
void dispose ()

Detailed Description

Select - Abstract super class for LOOKUPSWITCH and TABLESWITCH instructions.

Version:
Id:
Select.java,v 1.1.1.1 2002/01/24 03:44:04 pserver Exp
Author:
M. Dahm
See also:
LOOKUPSWITCH , TABLESWITCH , InstructionList

Definition at line 15 of file lib/jpf/de/fub/bytecode/generic/Select.java.


Constructor & Destructor Documentation

Select::Select   [inline, private]
 

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

Definition at line 28 of file lib/jpf/de/fub/bytecode/generic/Select.java.

Select::Select short   tag,
int   match[],
InstructionHandle   targets[],
InstructionHandle   target
[inline, private]
 

(Match, target) pairs for switch. `Match' and `targets' must have the same length of course.

Parameters:
match   array of matching values
targets   instruction targets
target   default instruction target

Definition at line 37 of file lib/jpf/de/fub/bytecode/generic/Select.java.

Select::Select   [inline, private]
 

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

Definition at line 29 of file src/de/fub/bytecode/generic/Select.java.

Select::Select short   tag,
int   match[],
InstructionHandle   targets[],
InstructionHandle   target
[inline, private]
 

(Match, target) pairs for switch. `Match' and `targets' must have the same length of course.

Parameters:
match   array of matching values
targets   instruction targets
target   default instruction target

Definition at line 38 of file src/de/fub/bytecode/generic/Select.java.


Member Function Documentation

boolean Select::containsTarget InstructionHandle   ih [inline]
 

Returns:
true, if ih is target of this instruction

Reimplemented from BranchInstruction.

Definition at line 56 of file src/de/fub/bytecode/generic/Select.java.

boolean Select::containsTarget InstructionHandle   ih [inline]
 

Returns:
true, if ih is target of this instruction

Reimplemented from BranchInstruction.

Definition at line 55 of file lib/jpf/de/fub/bytecode/generic/Select.java.

void Select::dispose   [inline, private]
 

Inform targets that they're not targeted anymore.

Reimplemented from BranchInstruction.

Definition at line 69 of file src/de/fub/bytecode/generic/Select.java.

void Select::dispose   [inline, private]
 

Inform targets that they're not targeted anymore.

Reimplemented from BranchInstruction.

Definition at line 68 of file lib/jpf/de/fub/bytecode/generic/Select.java.

void Select::dump DataOutputStream   out [inline]
 

Dump instruction as byte code to stream out.

Parameters:
out   Output stream

Reimplemented from BranchInstruction.

Reimplemented in LOOKUPSWITCH, TABLESWITCH, LOOKUPSWITCH, and TABLESWITCH.

Definition at line 79 of file src/de/fub/bytecode/generic/Select.java.

void Select::dump DataOutputStream   out [inline]
 

Dump instruction as byte code to stream out.

Parameters:
out   Output stream

Reimplemented from BranchInstruction.

Reimplemented in LOOKUPSWITCH, TABLESWITCH, LOOKUPSWITCH, and TABLESWITCH.

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

int [] Select::getIndices   [inline]
 

Returns:
array of match target offsets

Definition at line 91 of file src/de/fub/bytecode/generic/Select.java.

int [] Select::getIndices   [inline]
 

Returns:
array of match target offsets

Definition at line 90 of file lib/jpf/de/fub/bytecode/generic/Select.java.

Referenced by InstructionList::InstructionList().

int [] Select::getMatchs   [inline]
 

Returns:
array of match indices

Definition at line 95 of file src/de/fub/bytecode/generic/Select.java.

int [] Select::getMatchs   [inline]
 

Returns:
array of match indices

Definition at line 94 of file lib/jpf/de/fub/bytecode/generic/Select.java.

InstructionHandle [] Select::getTargets   [inline]
 

Returns:
array of match targets

Definition at line 99 of file src/de/fub/bytecode/generic/Select.java.

InstructionHandle [] Select::getTargets   [inline]
 

Returns:
array of match targets

Definition at line 98 of file lib/jpf/de/fub/bytecode/generic/Select.java.

Referenced by MethodGen::getMaxStack().

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

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

Reimplemented from BranchInstruction.

Reimplemented in LOOKUPSWITCH, TABLESWITCH, LOOKUPSWITCH, and TABLESWITCH.

Definition at line 103 of file src/de/fub/bytecode/generic/Select.java.

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

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

Reimplemented from BranchInstruction.

Reimplemented in LOOKUPSWITCH, TABLESWITCH, LOOKUPSWITCH, and TABLESWITCH.

Definition at line 102 of file lib/jpf/de/fub/bytecode/generic/Select.java.

void Select::setTarget int   i,
InstructionHandle   target
[inline]
 

Set branch target for `i'th case

Definition at line 119 of file src/de/fub/bytecode/generic/Select.java.

void Select::setTarget int   i,
InstructionHandle   target
[inline]
 

Set branch target for `i'th case

Definition at line 118 of file lib/jpf/de/fub/bytecode/generic/Select.java.

Referenced by InstructionList::InstructionList().

String Select::toString boolean   verbose [inline]
 

Returns:
mnemonic for instruction

Reimplemented from BranchInstruction.

Definition at line 126 of file src/de/fub/bytecode/generic/Select.java.

String Select::toString boolean   verbose [inline]
 

Returns:
mnemonic for instruction

Reimplemented from BranchInstruction.

Definition at line 125 of file lib/jpf/de/fub/bytecode/generic/Select.java.

int Select::updatePosition int   offset,
int   max_offset
[inline, protected]
 

Since this is a variable length instruction, it may shift the following instructions which then need to update their position.

Called by InstructionList.setPositions when setting the position for every instruction. In the presence of variable length instructions `setPositions' performs multiple passes over the instruction list to calculate the correct (byte) positions and offsets by calling this function.

Parameters:
offset   additional offset caused by preceding (variable length) instructions
max_offset   the maximum offset that may be caused by these instructions
Returns:
additional offset caused by possible change of this instruction's length

Reimplemented from BranchInstruction.

Definition at line 157 of file src/de/fub/bytecode/generic/Select.java.

int Select::updatePosition int   offset,
int   max_offset
[inline, protected]
 

Since this is a variable length instruction, it may shift the following instructions which then need to update their position.

Called by InstructionList.setPositions when setting the position for every instruction. In the presence of variable length instructions `setPositions' performs multiple passes over the instruction list to calculate the correct (byte) positions and offsets by calling this function.

Parameters:
offset   additional offset caused by preceding (variable length) instructions
max_offset   the maximum offset that may be caused by these instructions
Returns:
additional offset caused by possible change of this instruction's length

Reimplemented from BranchInstruction.

Definition at line 156 of file lib/jpf/de/fub/bytecode/generic/Select.java.

void Select::updateTarget InstructionHandle   old_ih,
InstructionHandle   new_ih
[inline]
 

Parameters:
old_ih   old target
new_ih   new target

Reimplemented from BranchInstruction.

Definition at line 173 of file src/de/fub/bytecode/generic/Select.java.

void Select::updateTarget InstructionHandle   old_ih,
InstructionHandle   new_ih
[inline]
 

Parameters:
old_ih   old target
new_ih   new target

Reimplemented from BranchInstruction.

Definition at line 172 of file lib/jpf/de/fub/bytecode/generic/Select.java.


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