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

LDC2_W.java

00001 package de.fub.bytecode.generic;
00002 
00003 /** 
00004  * LDC2_W - Push long or double from constant pool
00005  *
00006  * <PRE>Stack: ... -&gt; ..., item.word1, item.word2</PRE>
00007  *
00008  * @version $Id: LDC2_W.java,v 1.1.1.1 2002/01/24 03:44:05 pserver Exp $
00009  * @author  <A HREF="http://www.inf.fu-berlin.de/~dahm">M. Dahm</A>
00010  */
00011 public class LDC2_W extends CPInstruction implements PushInstruction {
00012   /**
00013    * Empty constructor needed for the Class.newInstance() statement in
00014    * Instruction.readInstruction(). Not to be used otherwise.
00015    */
00016   LDC2_W() {}  
00017   public LDC2_W(int index) {
00018     super(LDC2_W, index);
00019   }  
00020   public Type getType(ConstantPoolGen cpg) {
00021     switch(cpg.getConstantPool().getConstant(index).getTag()) {
00022     case CONSTANT_Long:   return Type.LONG;
00023     case CONSTANT_Double: return Type.DOUBLE;
00024     default: // Never reached
00025       throw new RuntimeException("Unknown constant type " + tag);
00026     }
00027   }  
00028 }

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