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

NEW.java

00001 package de.fub.bytecode.generic;
00002 
00003 import java.io.*;
00004 
00005 /** 
00006  * NEW - Create new object
00007  * <PRE>Stack: ... -&gt; ..., objectref</PRE>
00008  *
00009  * @version $Id: NEW.java,v 1.1.1.1 2002/01/24 03:44:05 pserver Exp $
00010  * @author  <A HREF="http://www.inf.fu-berlin.de/~dahm">M. Dahm</A>
00011  */
00012 public class NEW extends CPInstruction implements LoadClass, AllocationInstruction, ExceptionThrower {
00013   /**
00014    * Empty constructor needed for the Class.newInstance() statement in
00015    * Instruction.readInstruction(). Not to be used otherwise.
00016    */
00017   NEW() {}  
00018   public NEW(int index) {
00019     super(NEW, index);
00020   }  
00021   public Class[] getExceptions(){
00022     Class[] cs = new Class[2 + EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
00023 
00024     System.arraycopy(EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0,
00025              cs, 0, EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
00026     cs[EXCS_CLASS_AND_INTERFACE_RESOLUTION.length-1] = INSTANTIATION_ERROR;
00027     cs[EXCS_CLASS_AND_INTERFACE_RESOLUTION.length]   = ILLEGAL_ACCESS_ERROR;
00028     return cs;
00029   }  
00030 }

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