1 package com.sun.org.apache.bcel.internal.generic; 2 3 56 import com.sun.org.apache.bcel.internal.Constants; 57 import com.sun.org.apache.bcel.internal.ExceptionConstants; 58 59 67 public class INVOKEVIRTUAL extends InvokeInstruction { 68 72 INVOKEVIRTUAL() {} 73 74 public INVOKEVIRTUAL(int index) { 75 super(Constants.INVOKEVIRTUAL, index); 76 } 77 78 public Class [] getExceptions() { 79 Class [] cs = new Class [4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length]; 80 81 System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, 82 cs, 0, ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length); 83 84 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+3] = ExceptionConstants.UNSATISFIED_LINK_ERROR; 85 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+2] = ExceptionConstants.ABSTRACT_METHOD_ERROR; 86 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR; 87 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION; 88 89 return cs; 90 } 91 92 93 101 public void accept(Visitor v) { 102 v.visitExceptionThrower(this); 103 v.visitTypedInstruction(this); 104 v.visitStackConsumer(this); 105 v.visitStackProducer(this); 106 v.visitLoadClass(this); 107 v.visitCPInstruction(this); 108 v.visitFieldOrMethod(this); 109 v.visitInvokeInstruction(this); 110 v.visitINVOKEVIRTUAL(this); 111 } 112 } 113 | Popular Tags |