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

JSR_W.java

00001 package de.fub.bytecode.generic;
00002 
00003 import java.io.*;
00004 import de.fub.bytecode.util.ByteSequence;
00005 
00006 /** 
00007  * JSR_W - Jump to subroutine
00008  *
00009  * @version $Id: JSR_W.java,v 1.1.1.1 2002/01/24 03:44:02 pserver Exp $
00010  * @author  <A HREF="http://www.inf.fu-berlin.de/~dahm">M. Dahm</A>
00011  */
00012 public class JSR_W extends BranchInstruction {
00013   /**
00014    * Empty constructor needed for the Class.newInstance() statement in
00015    * Instruction.readInstruction(). Not to be used otherwise.
00016    */
00017   JSR_W() {}  
00018   public JSR_W(InstructionHandle target) {
00019     super(JSR_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:49:00 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001