00001 package de.fub.bytecode.generic;
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 public class ICONST extends Instruction implements ConstantPushInstruction {
00012 private int value;
00013
00014
00015
00016
00017
00018 ICONST() {}
00019 public ICONST(int i) {
00020 super(ICONST_0, (short)1);
00021
00022 if((i >= -1) && (i <= 5))
00023 tag = (short)(ICONST_0 + i);
00024 else
00025 throw new ClassGenException("ICONST can be used only for value between -1 and 5: " +
00026 i);
00027 value = i;
00028 }
00029 public Number getValue() { return new Integer(value); }
00030 }