Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

GOTO_W.java

00001 package de.fub.bytecode.generic;
00002 
00003 import java.io.*;
00004 import de.fub.bytecode.util.ByteSequence;
00005 
00006 /** 
00007  * GOTO_W - Branch always (offset, not address)
00008  *
00009  * @version $Id: GOTO_W.java,v 1.1.1.1 2002/01/24 03:44:06 pserver Exp $
00010  * @author  <A HREF="http://www.inf.fu-berlin.de/~dahm">M. Dahm</A>
00011  */
00012 public class GOTO_W extends BranchInstruction implements UnconditionalBranch {
00013   /**
00014    * Empty constructor needed for the Class.newInstance() statement in
00015    * Instruction.readInstruction(). Not to be used otherwise.
00016    */
00017   GOTO_W() {}  
00018   public GOTO_W(InstructionHandle target) {
00019     super(GOTO_W, target);
00020     length = 5;
00021   }  
00022   /**
00023    * Dump instruction as byte code to stream out.
00024    * @param out Output stream
00025    */
00026   public void dump(DataOutputStream out) throws IOException {
00027     index = getTargetOffset();
00028     out.writeByte(tag);
00029     out.writeInt(index);
00030   }  
00031   /**
00032    * Read needed data (e.g. index) from file.
00033    */
00034   protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
00035   {
00036     index  = bytes.readInt();
00037     length = 5;
00038   }  
00039 }

Generated at Thu Feb 7 06:46:03 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001