1 17 package org.apache.bcel.generic; 18 19 import org.apache.bcel.Constants; 20 import org.apache.bcel.ExceptionConstants; 21 22 31 public class INVOKESPECIAL extends InvokeInstruction { 32 33 37 INVOKESPECIAL() { 38 } 39 40 41 public INVOKESPECIAL(int index) { 42 super(Constants.INVOKESPECIAL, index); 43 } 44 45 46 public Class [] getExceptions() { 47 Class [] cs = new Class [4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length]; 48 System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0, 49 ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length); 50 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 3] = ExceptionConstants.UNSATISFIED_LINK_ERROR; 51 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 2] = ExceptionConstants.ABSTRACT_METHOD_ERROR; 52 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR; 53 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION; 54 return cs; 55 } 56 57 58 66 public void accept( Visitor v ) { 67 v.visitExceptionThrower(this); 68 v.visitTypedInstruction(this); 69 v.visitStackConsumer(this); 70 v.visitStackProducer(this); 71 v.visitLoadClass(this); 72 v.visitCPInstruction(this); 73 v.visitFieldOrMethod(this); 74 v.visitInvokeInstruction(this); 75 v.visitINVOKESPECIAL(this); 76 } 77 } 78 | Popular Tags |