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:41:40 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(de.fub.bytecode.Constants.JSR_W, target);
00020     length = 5;
00021   }  
00022   /**
00023    * Call corresponding visitor method(s). The order is:
00024    * Call visitor methods of implemented interfaces first, then
00025    * call methods according to the class hierarchy in descending order,
00026    * i.e., the most specific visitXXX() call comes last.
00027    *
00028    * @param v Visitor object
00029    */
00030   public void accept(Visitor v) {
00031     v.visitInstructionTargeter(this);
00032     v.visitBranchInstruction(this);
00033     v.visitJSR_W(this);
00034   }  
00035   /**
00036    * Dump instruction as byte code to stream out.
00037    * @param out Output stream
00038    */
00039   public void dump(DataOutputStream out) throws IOException {
00040     index = getTargetOffset();
00041     out.writeByte(tag);
00042     out.writeInt(index);
00043   }  
00044   /**
00045    * Read needed data (e.g. index) from file.
00046    */
00047   protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
00048   {
00049     index = bytes.readInt();
00050     length = 5;
00051  } 
00052 }

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