1 package com.sun.org.apache.bcel.internal.generic; 2 3 56 57 import com.sun.org.apache.bcel.internal.Constants; 58 import com.sun.org.apache.bcel.internal.ExceptionConstants; 59 60 69 public class GETSTATIC extends FieldInstruction implements PushInstruction, ExceptionThrower { 70 74 GETSTATIC() {} 75 76 public GETSTATIC(int index) { 77 super(Constants.GETSTATIC, index); 78 } 79 80 public int produceStack(ConstantPoolGen cpg) { return getFieldSize(cpg); } 81 82 public Class [] getExceptions() { 83 Class [] cs = new Class [1 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length]; 84 85 System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, 86 cs, 0, ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length); 87 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = 88 ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR; 89 90 return cs; 91 } 92 93 94 102 public void accept(Visitor v) { 103 v.visitStackProducer(this); 104 v.visitPushInstruction(this); 105 v.visitExceptionThrower(this); 106 v.visitTypedInstruction(this); 107 v.visitLoadClass(this); 108 v.visitCPInstruction(this); 109 v.visitFieldOrMethod(this); 110 v.visitFieldInstruction(this); 111 v.visitGETSTATIC(this); 112 } 113 } 114 | Popular Tags |