jellyj.classfile.classgen
Class Select

jellyj.classfile.classgen.Instruction
  |
  +--jellyj.classfile.classgen.BranchInstruction
        |
        +--jellyj.classfile.classgen.Select
Direct Known Subclasses:
LOOKUPSWITCH, TABLESWITCH

abstract class Select
extends BranchInstruction
implements VariableLengthInstruction

Select - Abstract super class for LOOKUPSWITCH and TABLESWITCH instructions.

Author:
JellyJ Design Group
See Also: LOOKUPSWITCH, TABLESWITCH, InstructionList

Constructor Summary
 (package private) Select()
          Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction().
 (package private) Select(short tag, int[] match, InstructionHandle[] targets, InstructionHandle target)
          (Match, target) pairs for switch.

Method Summary
 voiddump(DataOutputStream out)
          Dump instruction as byte code to stream out.
 int[]getIndices()
           
 int[]getMatchs()
           
 InstructionHandle[]getTargets()
           
 StringtoString()
           

Methods inherited from class jellyj.classfile.classgen.BranchInstruction
getIndex, getTarget, setTarget

Methods inherited from class jellyj.classfile.classgen.Instruction
consumeStack, copy, getLength, getPosition, getTag, produceStack, readInstruction, setPosition

Constructor Detail

Select

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

Select

Select(short tag, int[] match, InstructionHandle[] targets, InstructionHandle target)
(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
Method Detail

dump

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

getIndices

public int[] getIndices()
Returns: array of match target offsets

getMatchs

public int[] getMatchs()
Returns: array of match indices

getTargets

public InstructionHandle[] getTargets()
Returns: array of match targets

toString

public String toString()
Returns: mnemonic for instruction

Association Links

to Class jellyj.classfile.classgen.InstructionHandle