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