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
00015 public class GETSTATIC extends FieldInstruction implements PushInstruction, ExceptionThrower {
00016
00017
00018
00019
00020 GETSTATIC() {}
00021 public GETSTATIC(int index) {
00022 super(Constants.GETSTATIC, index);
00023 }
00024
00025
00026
00027
00028
00029
00030
00031
00032 public void accept(Visitor v) {
00033 v.visitStackProducer(this);
00034 v.visitPushInstruction(this);
00035 v.visitExceptionThrower(this);
00036 v.visitTypedInstruction(this);
00037 v.visitLoadClass(this);
00038 v.visitCPInstruction(this);
00039 v.visitFieldOrMethod(this);
00040 v.visitFieldInstruction(this);
00041 v.visitGETSTATIC(this);
00042 }
00043 public Class[] getExceptions() {
00044 Class[] cs = new Class[1 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
00045
00046 System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0,
00047 cs, 0, ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
00048 cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] =
00049 ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
00050
00051 return cs;
00052 }
00053 public int produceStack(ConstantPoolGen cpg) { return getFieldSize(cpg); }
00054 }