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 68 public class INVOKESPECIAL extends InvokeInstruction { 69 73 INVOKESPECIAL() {} 74 75 public INVOKESPECIAL(int index) { 76 super(Constants.INVOKESPECIAL, index); 77 } 78 79 public Class [] getExceptions() { 80 Class [] cs = new Class [4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length]; 81 82 System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, 83 cs, 0, ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length); 84 85 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+3] = ExceptionConstants.UNSATISFIED_LINK_ERROR; 86 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+2] = ExceptionConstants.ABSTRACT_METHOD_ERROR; 87 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length+1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR; 88 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION; 89 90 return cs; 91 } 92 93 94 102 public void accept(Visitor v) { 103 v.visitExceptionThrower(this); 104 v.visitTypedInstruction(this); 105 v.visitStackConsumer(this); 106 v.visitStackProducer(this); 107 v.visitLoadClass(this); 108 v.visitCPInstruction(this); 109 v.visitFieldOrMethod(this); 110 v.visitInvokeInstruction(this); 111 v.visitINVOKESPECIAL(this); 112 } 113 } 114 | Popular Tags |