FileDocCategorySizeDatePackage
BIPUSH.javaAPI DocJava SE 5 API4601Fri Aug 26 14:55:18 BST 2005com.sun.org.apache.bcel.internal.generic

BIPUSH

public class BIPUSH extends Instruction implements ConstantPushInstruction
BIPUSH - Push byte on stack
Stack: ... -> ..., value
version
$Id: BIPUSH.java,v 1.1.1.1 2001/10/29 20:00:06 jvanzyl Exp $
author
M. Dahm

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

public BIPUSH(byte b)
Push byte on stack

    super(com.sun.org.apache.bcel.internal.Constants.BIPUSH, (short)2);
    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.visitBIPUSH(this);
  
public voiddump(java.io.DataOutputStream out)
Dump instruction as byte code to stream out.

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

return
Type.BYTE

    return Type.BYTE;
  
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 = 2;
    b      = bytes.readByte();
  
public java.lang.StringtoString(boolean verbose)

return
mnemonic for instruction

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