00001 package de.fub.bytecode.generic;
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 public class LDC2_W extends CPInstruction implements PushInstruction {
00012
00013
00014
00015
00016 LDC2_W() {}
00017 public LDC2_W(int index) {
00018 super(LDC2_W, index);
00019 }
00020 public Type getType(ConstantPoolGen cpg) {
00021 switch(cpg.getConstantPool().getConstant(index).getTag()) {
00022 case CONSTANT_Long: return Type.LONG;
00023 case CONSTANT_Double: return Type.DOUBLE;
00024 default:
00025 throw new RuntimeException("Unknown constant type " + tag);
00026 }
00027 }
00028 }