00001 package de.fub.bytecode.generic;
00002
00003 import de.fub.bytecode.ExceptionConstants;
00004
00005
00006
00007
00008
00009
00010
00011
00012 public class ANEWARRAY extends CPInstruction
00013 implements LoadClass, AllocationInstruction, ExceptionThrower, StackProducer {
00014
00015
00016
00017
00018 ANEWARRAY() {}
00019 public ANEWARRAY(int index) {
00020 super(de.fub.bytecode.Constants.ANEWARRAY, index);
00021 }
00022
00023
00024
00025
00026
00027
00028
00029
00030 public void accept(Visitor v) {
00031 v.visitLoadClass(this);
00032 v.visitAllocationInstruction(this);
00033 v.visitExceptionThrower(this);
00034 v.visitStackProducer(this);
00035 v.visitTypedInstruction(this);
00036 v.visitCPInstruction(this);
00037 v.visitANEWARRAY(this);
00038 }
00039 public Class[] getExceptions(){
00040 Class[] cs = new Class[1 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
00041
00042 System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0,
00043 cs, 0, ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
00044 cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length] =
00045 ExceptionConstants.NEGATIVE_ARRAY_SIZE_EXCEPTION;
00046 return cs;
00047 }
00048 }