APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.bcel.internal.generic

public Class TABLESWITCH

extends Select
Class Inheritance
Imports
java.io.DataOutputStream, .IOException, com.sun.org.apache.bcel.internal.util.ByteSequence

TABLESWITCH - Switch within given range of values, i.e., low..high
See Also
SWITCH

Field Summary

Inherited from com.sun.org.apache.bcel.internal.generic.Select:
fixed_lengthindicesmatchmatch_lengthpaddingtargets

Constructor Summary

AccessConstructor and Description
pack-priv
TABLESWITCH()

Empty constructor needed for Instruction.readInstruction.

public
TABLESWITCH(final int[]
sorted array of match values, match[0] must be low value, match[match_length - 1] high value
match
,
final InstructionHandle[]
where to branch for matched values
targets
,
final InstructionHandle
default branch
defaultTarget
)

Method Summary

Modifier and TypeMethod and Description
public void
accept(final Visitor
Visitor object
v
)

Implements abstract com.sun.org.apache.bcel.internal.generic.Instruction.accept.

Call corresponding visitor method(s).

public void
dump(final DataOutputStream
Output stream
out
)

Overrides com.sun.org.apache.bcel.internal.generic.Select.dump.

Dump instruction as byte code to stream out.

protected void
initFromFile(final ByteSequence bytes, final boolean wide)

Overrides com.sun.org.apache.bcel.internal.generic.Select.initFromFile.

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

Inherited from com.sun.org.apache.bcel.internal.generic.Select:
clonecontainsTargetdisposegetFixedLengthgetIndicesgetIndicesgetMatchgetMatchLengthgetMatchsgetPaddinggetTargetgetTargetssetFixedLengthsetIndicessetIndicessetMatchsetMatchessetMatchLengthsetTargetsetTargetstoStringupdatePositionupdateTarget

Constructor Detail

TABLESWITCHback to summary
pack-priv TABLESWITCH()

Empty constructor needed for Instruction.readInstruction. Not to be used otherwise.

TABLESWITCHback to summary
public TABLESWITCH(final int[] match, final InstructionHandle[] targets, final InstructionHandle defaultTarget)
Parameters
match:int[]

sorted array of match values, match[0] must be low value, match[match_length - 1] high value

targets:InstructionHandle[]

where to branch for matched values

defaultTarget:InstructionHandle

default branch

Method Detail

acceptback to summary
public void accept(final Visitor v)

Implements abstract com.sun.org.apache.bcel.internal.generic.Instruction.accept.

Call corresponding visitor method(s). The order is: Call visitor methods of implemented interfaces first, then call methods according to the class hierarchy in descending order, i.e., the most specific visitXXX() call comes last.

Parameters
v:Visitor

Visitor object

Annotations
@Override
dumpback to summary
public void dump(final DataOutputStream out) throws IOException

Overrides com.sun.org.apache.bcel.internal.generic.Select.dump.

Dump instruction as byte code to stream out.

Parameters
out:DataOutputStream

Output stream

Annotations
@Override
Exceptions
IOException:

Doc from com.sun.org.apache.bcel.internal.generic.Instruction.dump.

Thrown when an I/O exception of some sort has occurred.

initFromFileback to summary
protected void initFromFile(final ByteSequence bytes, final boolean wide) throws IOException

Overrides com.sun.org.apache.bcel.internal.generic.Select.initFromFile.

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

Annotations
@Override
Exceptions
IOException:

Doc from com.sun.org.apache.bcel.internal.generic.Instruction.initFromFile.

may be thrown if the implementation needs to read data from the file