int getConstantValue(ConstPool cp, CtClass type) { if (type.getName().equals(javaLangString)) return cp.addStringInfo(value); else return 0; } }
public int copy(ConstPool src, ConstPool dest, Map map) { return dest.addStringInfo(src.getUtf8Info(string)); }
@Override int getConstantValue(ConstPool cp, CtClass type) { if (type.getName().equals(javaLangString)) return cp.addStringInfo(value); return 0; } }
/** * Appends LDC or LDC_W. The pushed item is a <code>String</code> * object. * * @param s the character string pushed by LDC or LDC_W. */ public void addLdc(String s) { addLdc(constPool.addStringInfo(s)); }
/** * Appends LDC or LDC_W. The pushed item is a <code>String</code> * object. * * @param s the character string pushed by LDC or LDC_W. */ public void addLdc(String s) { addLdc(constPool.addStringInfo(s)); }
@Override public int copy(ConstPool src, ConstPool dest, Map<String,String> map) { return dest.addStringInfo(src.getUtf8Info(string)); }
int getConstantValue2(ConstPool cp, CtClass type, ASTree tree) { if (type.isPrimitive()) { if (tree instanceof IntConst) { long value = ((IntConst)tree).get(); if (type == CtClass.doubleType) return cp.addDoubleInfo((double)value); else if (type == CtClass.floatType) return cp.addFloatInfo((float)value); else if (type == CtClass.longType) return cp.addLongInfo(value); else if (type != CtClass.voidType) return cp.addIntegerInfo((int)value); } else if (tree instanceof DoubleConst) { double value = ((DoubleConst)tree).get(); if (type == CtClass.floatType) return cp.addFloatInfo((float)value); else if (type == CtClass.doubleType) return cp.addDoubleInfo(value); } } else if (tree instanceof StringL && type.getName().equals(javaLangString)) return cp.addStringInfo(((StringL)tree).get()); return 0; } }
int getConstantValue2(ConstPool cp, CtClass type, ASTree tree) { if (type.isPrimitive()) { if (tree instanceof IntConst) { long value = ((IntConst)tree).get(); if (type == CtClass.doubleType) return cp.addDoubleInfo(value); else if (type == CtClass.floatType) return cp.addFloatInfo(value); else if (type == CtClass.longType) return cp.addLongInfo(value); else if (type != CtClass.voidType) return cp.addIntegerInfo((int)value); } else if (tree instanceof DoubleConst) { double value = ((DoubleConst)tree).get(); if (type == CtClass.floatType) return cp.addFloatInfo((float)value); else if (type == CtClass.doubleType) return cp.addDoubleInfo(value); } } else if (tree instanceof StringL && type.getName().equals(javaLangString)) return cp.addStringInfo(((StringL)tree).get()); return 0; } }
int getConstantValue(ConstPool cp, CtClass type) { if (type.getName().equals(javaLangString)) return cp.addStringInfo(value); else return 0; } }
int getConstantValue(ConstPool cp, CtClass type) { if (type.getName().equals(javaLangString)) return cp.addStringInfo(value); else return 0; } }
int getConstantValue(ConstPool cp, CtClass type) { if (type.getName().equals(javaLangString)) return cp.addStringInfo(value); else return 0; } }
int getConstantValue(ConstPool cp, CtClass type) { if (type.getName().equals(javaLangString)) return cp.addStringInfo(value); else return 0; } }
int getConstantValue(ConstPool cp, CtClass type) { if (type.getName().equals(javaLangString)) return cp.addStringInfo(value); else return 0; } }
/** * Appends LDC or LDC_W. The pushed item is a <code>String</code> * object. * * @param s the character string pushed by LDC or LDC_W. */ public void addLdc(String s) { addLdc(constPool.addStringInfo(s)); }
/** * Appends LDC or LDC_W. The pushed item is a <code>String</code> * object. * * @param s the character string pushed by LDC or LDC_W. */ public void addLdc(String s) { addLdc(constPool.addStringInfo(s)); }
public int copy(ConstPool src, ConstPool dest, Map map) { return dest.addStringInfo(src.getUtf8Info(string)); }
/** * Appends LDC or LDC_W. The pushed item is a <code>String</code> * object. * * @param s the character string pushed by LDC or LDC_W. */ public void addLdc(String s) { addLdc(constPool.addStringInfo(s)); }
public int copy(ConstPool src, ConstPool dest, Map map) { return dest.addStringInfo(src.getUtf8Info(string)); }
/** * Appends LDC or LDC_W. The pushed item is a <code>String</code> * object. * * @param s the character string pushed by LDC or LDC_W. */ public void addLdc(String s) { addLdc(constPool.addStringInfo(s)); }
/** * Appends LDC or LDC_W. The pushed item is a <code>String</code> * object. * * @param s the character string pushed by LDC or LDC_W. */ public void addLdc(String s) { addLdc(constPool.addStringInfo(s)); }