Source code for /engineering/autohit-2003/src/autohit/vm/i/VMIGoto.javaOriginal file VMIGoto.java
   1 /**
   2  * AUTOHIT 2003
   3  * Copyright Erich P Gatejen (c) 1989,1997,2003,2004
   4  * 
   5  * This program is free software; you can redistribute it and/or modify 
   6  * it under the terms of the GNU General Public License as published by 
   7  * the Free Software Foundation; either version 2 of the License, or (at
   8  * your option) any later version.
   9  * This program is distributed in the hope that it will be useful, but
  10  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12  * more details.
  13  * 
  14  * You should have received a copy of the GNU General Public License along
  15  * with this program; if not, write to the Free Software Foundation, Inc.,
  16  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17  *
  18  * Additional license information can be found in the documentation.
  19  * @author Erich P Gatejen
  20  */
  21 package autohit.vm.i;
  22 
  23 /**
  24  * A Virtual Machine instruction.  GOTO instruction.
  25  * It will be sensitive to scope frames.
  26  *
  27  * @see autohit.vm.i.VMInstruction
  28  *
  29  * @author Erich P. Gatejen
  30  * @version 1.0
  31  * <i>Version History</i>
  32  * <code>EPG - Rewrite - 9Apr03<br>
  33  * EPG - Add goto - 16Jul03</code>
  34  * 
  35  */
  36 public class VMIGoto extends VMInstruction {
  37 
  38 	final static long serialVersionUID = 1;
  39 	
  40 	/**
  41 	 * Goto target.
  42 	 * @serial
  43 	 */
  44 	public int t;
  45 
  46 	/**
  47 	 *  Default constructor.
  48 	 */
  49 	public VMIGoto() {
  50 		super(VMInstruction.GOTO);
  51 	}
  52 
  53 	/**
  54 	 * Any exception will be allowed to bubble out
  55 	 * @param tString parseable numeric text
  56 	 */
  57 	public void setT(String tString) {
  58 		t = Integer.parseInt(tString);
  59 	}
  60 
  61 	/**
  62 	 *  Dump this Instruction.  Mostly for debugging.
  63 	 *
  64 	 *  @return a String containing the dump.
  65 	 */
  66 	public String toString() {
  67 		return "VMIGoto " + super.toString() + ": --- target=" + t;
  68 	}
  69 
  70 }