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

LCONST.java

00001 package de.fub.bytecode.generic;
00002 
00003 /** 
00004  * LCONST - Push 0 or 1, other values cause an exception
00005  *
00006  * <PRE>Stack: ... -&gt; ..., <i></PRE>
00007  *
00008  * @version $Id: LCONST.java,v 1.1.1.1 2002/01/24 03:44:02 pserver Exp $
00009  * @author  <A HREF="http://www.inf.fu-berlin.de/~dahm">M. Dahm</A>
00010  */
00011 public class LCONST extends Instruction implements ConstantPushInstruction {
00012   private long value;
00013 
00014   /**
00015    * Empty constructor needed for the Class.newInstance() statement in
00016    * Instruction.readInstruction(). Not to be used otherwise.
00017    */
00018   LCONST() {}  
00019   public LCONST(long l) {
00020     super(LCONST_0, (short)1);
00021 
00022     if(l == 0)
00023       tag = LCONST_0;
00024     else if(l == 1)
00025       tag = LCONST_1;
00026     else
00027       throw new ClassGenException("LCONST can be used only for 0 and 1: " + l);
00028 
00029     value = l;
00030   }  
00031   public Number getValue() { return new Long(value); }  
00032 }

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