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

public Class SIPUSH

extends Instruction
implements ConstantPushInstruction
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.bcel.internal.generic.ConstantPushInstruction, com.sun.org.apache.bcel.internal.generic.TypedInstruction, com.sun.org.apache.bcel.internal.generic.PushInstruction, com.sun.org.apache.bcel.internal.generic.StackProducer
Imports
java.io.DataOutputStream, .IOException, com.sun.org.apache.bcel.internal.util.ByteSequence

SIPUSH - Push short
Stack: ... -> ..., value

Field Summary

Modifier and TypeField and Description
private short
b

Inherited from com.sun.org.apache.bcel.internal.generic.Instruction:
EMPTY_ARRAYlengthopcode

Constructor Summary

AccessConstructor and Description
pack-priv
SIPUSH()

Empty constructor needed for Instruction.readInstruction.

public
SIPUSH(final short b)

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.Instruction.dump.

Dump instruction as short code to stream out.
public Type
public Number
protected void
initFromFile(final ByteSequence
byte sequence to read from
bytes
,
final boolean
"wide" instruction flag
wide
)

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

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

Returns:

mnemonic for instruction
toString
(final boolean
long/short format switch
verbose
)

Overrides com.sun.org.apache.bcel.internal.generic.Instruction.toString.

Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")"
Inherited from com.sun.org.apache.bcel.internal.generic.Instruction:
consumeStackcopydisposeequalsgetComparatorgetLengthgetNamegetOpcodehashCodeisValidByteisValidShortproduceStackreadInstructionsetComparatorsetLengthsetOpcodetoStringtoString

Field Detail

bback to summary
private short b

Constructor Detail

SIPUSHback to summary
pack-priv SIPUSH()

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

SIPUSHback to summary
public SIPUSH(final short b)

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.Instruction.dump.

Dump instruction as short code to stream out.

Parameters
out:DataOutputStream

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

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.

getTypeback to summary
public Type getType(final ConstantPoolGen cp)

Implements com.sun.org.apache.bcel.internal.generic.TypedInstruction.getType.

Returns:Type

Type.SHORT

Annotations
@Override
getValueback to summary
public Number getValue()

Implements com.sun.org.apache.bcel.internal.generic.ConstantPushInstruction.getValue.

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

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

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

Parameters
bytes:ByteSequence

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

byte sequence to read from

wide:boolean

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

"wide" instruction flag

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

toStringback to summary
public String toString(final boolean verbose)

Overrides com.sun.org.apache.bcel.internal.generic.Instruction.toString.

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

Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")"

Parameters
verbose:boolean

long/short format switch

Returns:String

mnemonic for instruction

Annotations
@Override