Source code for /engineering/autohit-1998/autohit/vm/VMIJump.javaOriginal file VMIJump.java
   1 /**
   2  * .
   3  * Copyright � 1999 Erich P G.
   4  *
   5  */
   6  
   7 package autohit.vm;
   8 
   9 import java.io.Serializable;
  10 
  11 /**
  12  * A Virtual Machine instruction.  This impliments a JUMP.  It will
  13  * change the IP to the target address.
  14  *
  15  * @see autohit.vm.VMInstruction
  16  *
  17  * @author Erich P. Gatejen
  18  * @version 1.0
  19  * <i>Version History</i>
  20  * <code>EPG - Initial - 18Jan99</code> 
  21  * 
  22  */
  23 public class VMIJump extends VMInstruction {
  24 	
  25 	// --- FINAL FIELDS ------------------------------------------------------	
  26 
  27 	// --- FIELDS ------------------------------------------------------------
  28 
  29     /**
  30      * The jump target address.
  31      * @serial
  32      */ 
  33     public int      target;
  34 
  35 	// --- PUBLIC METHODS ----------------------------------------------------	
  36 
  37     /**
  38      *  Default constructor.
  39      */ 
  40     public VMIJump() {
  41         nToken = VMInstruction.JUMP;   
  42     }
  43 
  44     /**
  45      *  Dump this Instruction.  Mostly for debugging.
  46      *
  47      *  @return a String containing the dump.
  48      */
  49     public String toString() {
  50         StringBuffer d = new StringBuffer();        
  51         d.append(" VMIJump --------------------------- \n");
  52         d.append("    target = " + target + "\n");
  53         return d.toString();                
  54     }
  55     
  56 	// --- PRIVATE METHODS ---------------------------------------------------	
  57 
  58 
  59 }