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

INSTANCEOF.java

00001 package de.fub.bytecode.generic;
00002 
00003 /** 
00004  * INSTANCEOF - Determine if object is of given type
00005  * <PRE>Stack: ..., objectref -&gt; ..., result</PRE>
00006  *
00007  * @version $Id: INSTANCEOF.java,v 1.1.1.1 2002/01/24 03:41:40 pserver Exp $
00008  * @author  <A HREF="http://www.inf.fu-berlin.de/~dahm">M. Dahm</A>
00009  */
00010 public class INSTANCEOF extends CPInstruction
00011   implements LoadClass, ExceptionThrower, StackProducer, StackConsumer {
00012   /**
00013    * Empty constructor needed for the Class.newInstance() statement in
00014    * Instruction.readInstruction(). Not to be used otherwise.
00015    */
00016   INSTANCEOF() {}  
00017   public INSTANCEOF(int index) {
00018     super(de.fub.bytecode.Constants.INSTANCEOF, index);
00019   }  
00020   /**
00021    * Call corresponding visitor method(s). The order is:
00022    * Call visitor methods of implemented interfaces first, then
00023    * call methods according to the class hierarchy in descending order,
00024    * i.e., the most specific visitXXX() call comes last.
00025    *
00026    * @param v Visitor object
00027    */
00028   public void accept(Visitor v) {
00029     v.visitLoadClass(this);
00030     v.visitExceptionThrower(this);
00031     v.visitStackProducer(this);
00032     v.visitStackConsumer(this);
00033     v.visitTypedInstruction(this);
00034     v.visitCPInstruction(this);
00035     v.visitINSTANCEOF(this);
00036   }  
00037   public Class[] getExceptions() {
00038     return de.fub.bytecode.ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION;
00039   }  
00040 }

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