1   package jrre.instructionset.push;
2   
3   import jrre.*;
4   import jrre.types.*;
5   
6   public class BIPush extends jrre.instructionset.Instruction {
7   
8       private int operandOne;
9   
10      public BIPush(int operandOne){
11  
12          this.operandOne = operandOne;
13  
14          name = "bipush "+operandOne;
15          description = "pushes a byte.";
16          length = 1;
17      }
18     
19      /*** 
20       * Executes the <strong><code>bipush</code></strong> instruction.
21       * 
22       */
23      public void execute(){
24  
25          Stack.pushOperand(new PrimitiveType(operandOne));
26  
27      }
28  
29      public String toString(){
30          StringBuffer toReturn = new StringBuffer();
31          toReturn.append("bipush ");
32          toReturn.append(operandOne);
33          return toReturn.toString();
34      }
35  }
This page was automatically generated by Maven