/** * @param cp Constant pool * @param value to be pushed */ public PUSH(final ConstantPoolGen cp, final String value) { if (value == null) { instruction = InstructionConst.ACONST_NULL; } else { instruction = new LDC(cp.addString(value)); } }
/** * @param cp Constant pool * @param value to be pushed */ public PUSH(ConstantPoolGen cp, String value) { if(value == null) instruction = ACONST_NULL; else // Create a Constant pool entry instruction = new LDC(cp.addString(value)); }
private int addConstant() { switch(type.getType()) { case Constants.T_INT: case Constants.T_CHAR: case Constants.T_BYTE: case Constants.T_BOOLEAN: case Constants.T_SHORT: return cp.addInteger(((Integer)value).intValue()); case Constants.T_FLOAT: return cp.addFloat(((Float)value).floatValue()); case Constants.T_DOUBLE: return cp.addDouble(((Double)value).doubleValue()); case Constants.T_LONG: return cp.addLong(((Long)value).longValue()); case Constants.T_REFERENCE: return cp.addString(((String)value)); default: throw new RuntimeException("Oops: Unhandled : " + type.getType()); } }
private int addConstant() { switch (super.getType().getType()) { // sic case Const.T_INT: case Const.T_CHAR: case Const.T_BYTE: case Const.T_BOOLEAN: case Const.T_SHORT: return super.getConstantPool().addInteger(((Integer) value).intValue()); case Const.T_FLOAT: return super.getConstantPool().addFloat(((Float) value).floatValue()); case Const.T_DOUBLE: return super.getConstantPool().addDouble(((Double) value).doubleValue()); case Const.T_LONG: return super.getConstantPool().addLong(((Long) value).longValue()); case Const.T_REFERENCE: return super.getConstantPool().addString((String) value); default: throw new RuntimeException("Oops: Unhandled : " + super.getType().getType()); // sic } }
} else { String newz = val.replace(inputScan, substitute); int stringRef = cg.getConstantPool().addString(newz); handle.setInstruction(new LDC(stringRef)); logger.log(val + "->" + newz + " in " + cg.getClassName() + "." + m.getName());
LDC orig = ((LDC) handles[i].getInstruction()); String enc = (String) orig.getValue(cg.getConstantPool()); int index = cg.getConstantPool().addString(decrypt(enc)); LDC lc = new LDC(index); handles[i].setInstruction(lc);
int stringRef = cg.getConstantPool().addString(decryptedString); LDC lc = new LDC(stringRef); NOP nop = new NOP();
int stringRef = cg.getConstantPool().addString(decryptedString); LDC lc = new LDC(stringRef); NOP nop = new NOP();
int stringRef = cg.getConstantPool().addString(decryptedString); LDC lc = new LDC(stringRef); NOP nop = new NOP();
String decryptedString = StoreHandler.I(push); if (decryptedString != null) { int stringRef = cg.getConstantPool().addString(decryptedString); LDC lc = new LDC(stringRef); NOP nop = new NOP();
final ConstantString s = (ConstantString) c; final ConstantUtf8 u8 = (ConstantUtf8) constants[s.getStringIndex()]; return addString(u8.getBytes());
ConstantUtf8 u8 = (ConstantUtf8)constants[s.getStringIndex()]; return addString(u8.getBytes());
int con2 = GenericMethods.getValueOfNumber(handles[x + 2].getInstruction(), cg.getConstantPool()); NOP nop = new NOP(); int stringRef = cg.getConstantPool().addString(getActualString(cg.getClassName(), con1, con2)); LDC data = new LDC(stringRef); handles[x].setInstruction(data);
if (loc == stringBytes.length) { if (replacing) { int stringRef = cg.getConstantPool().addString(new String(stringBytes)); LDC lc = new LDC(stringRef); handles[startLoc].setInstruction(lc);
operations[i].nameIndexInCP = cp.addString(operations[i].getName()); operations[i].methodIndexInCP = cp.addMethodref( resourceClassName,
operations[i].nameIndexInCP = cp.addString(operations[i].getName()); operations[i].methodIndexInCP = cp.addMethodref( resourceClassName,