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

PUTFIELD.java

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

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