00001 package de.fub.bytecode.generic;
00002
00003 import de.fub.bytecode.Constants;
00004 import de.fub.bytecode.ExceptionConstants;
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 public class INVOKEVIRTUAL extends InvokeInstruction {
00015
00016
00017
00018
00019 INVOKEVIRTUAL() {}
00020 public INVOKEVIRTUAL(int index) {
00021 super(Constants.INVOKEVIRTUAL, index);
00022 }
00023
00024
00025
00026
00027
00028
00029
00030
00031 public void accept(Visitor v) {
00032 v.visitExceptionThrower(this);
00033 v.visitTypedInstruction(this);
00034 v.visitStackConsumer(this);
00035 v.visitStackProducer(this);
00036 v.visitLoadClass(this);
00037 v.visitCPInstruction(this);
00038 v.visitFieldOrMethod(this);
00039 v.visitInvokeInstruction(this);
00040 v.visitINVOKEVIRTUAL(this);
00041 }
00042 public Class[] getExceptions() {
00043 Class[] cs = new Class[4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
00044
00045 System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0,
00046 cs, 0, ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
00047
00048 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+3] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
00049 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+2] = ExceptionConstants.ABSTRACT_METHOD_ERROR;
00050 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
00051 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
00052
00053 return cs;
00054 }
00055 }