FileDocCategorySizeDatePackage
SIPUSH.javaAPI DocJava SE 6 API4569Tue Jun 10 00:22:22 BST 2008com.sun.org.apache.bcel.internal.generic

SIPUSH

public class SIPUSH extends Instruction implements ConstantPushInstruction
SIPUSH - Push short
Stack: ... -> ..., value
version
$Id: SIPUSH.java,v 1.1.2.1 2005/07/31 23:45:05 jeffsuttor Exp $
author
M. Dahm

Fields Summary
private short
b
Constructors Summary
SIPUSH()
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). Not to be used otherwise.

public SIPUSH(short b)

    super(com.sun.org.apache.bcel.internal.Constants.SIPUSH, (short)3);
    this.b = b;
  
Methods Summary
public voidaccept(com.sun.org.apache.bcel.internal.generic.Visitor v)
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.

param
v Visitor object

    v.visitPushInstruction(this);
    v.visitStackProducer(this);
    v.visitTypedInstruction(this);
    v.visitConstantPushInstruction(this);
    v.visitSIPUSH(this);
  
public voiddump(java.io.DataOutputStream out)
Dump instruction as short code to stream out.

    super.dump(out);
    out.writeShort(b);
  
public com.sun.org.apache.bcel.internal.generic.TypegetType(com.sun.org.apache.bcel.internal.generic.ConstantPoolGen cp)

return
Type.SHORT

    return Type.SHORT;
  
public java.lang.NumbergetValue()

 return new Integer(b); 
protected voidinitFromFile(com.sun.org.apache.bcel.internal.util.ByteSequence bytes, boolean wide)
Read needed data (e.g. index) from file.

    length = 3;
    b      = bytes.readShort();
  
public java.lang.StringtoString(boolean verbose)

return
mnemonic for instruction

    return super.toString(verbose) + " " + b;