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

INVOKESPECIAL.java

00001 package de.fub.bytecode.generic;
00002 
00003 import de.fub.bytecode.Constants;
00004 import de.fub.bytecode.ExceptionConstants;
00005 
00006 /** 
00007  * INVOKESPECIAL - Invoke instance method; special handling for superclass, private
00008  * and instance initialization method invocations
00009  *
00010  * <PRE>Stack: ..., objectref, [arg1, [arg2 ...]] -&gt; ...</PRE>
00011  *
00012  * @version $Id: INVOKESPECIAL.java,v 1.1.1.1 2002/01/24 03:41:40 pserver Exp $
00013  * @author  <A HREF="http://www.inf.fu-berlin.de/~dahm">M. Dahm</A>
00014  */
00015 public class INVOKESPECIAL extends InvokeInstruction {
00016   /**
00017    * Empty constructor needed for the Class.newInstance() statement in
00018    * Instruction.readInstruction(). Not to be used otherwise.
00019    */
00020   INVOKESPECIAL() {}  
00021   public INVOKESPECIAL(int index) {
00022     super(Constants.INVOKESPECIAL, index);
00023   }  
00024   /**
00025    * Call corresponding visitor method(s). The order is:
00026    * Call visitor methods of implemented interfaces first, then
00027    * call methods according to the class hierarchy in descending order,
00028    * i.e., the most specific visitXXX() call comes last.
00029    *
00030    * @param v Visitor object
00031    */
00032   public void accept(Visitor v) {
00033     v.visitExceptionThrower(this);
00034     v.visitTypedInstruction(this);
00035     v.visitStackConsumer(this);
00036     v.visitStackProducer(this);
00037     v.visitLoadClass(this);
00038     v.visitCPInstruction(this);
00039     v.visitFieldOrMethod(this);
00040     v.visitInvokeInstruction(this);
00041     v.visitINVOKESPECIAL(this);
00042   }  
00043   public Class[] getExceptions() {
00044     Class[] cs = new Class[4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
00045 
00046     System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0,
00047              cs, 0, ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
00048 
00049     cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+3] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
00050     cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+2] = ExceptionConstants.ABSTRACT_METHOD_ERROR;
00051     cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
00052     cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length]   = ExceptionConstants.NULL_POINTER_EXCEPTION;
00053 
00054     return cs;
00055   }  
00056 }

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