public Constant newConst(final Object cst) {
		if (cst instanceof Integer) {
			int val = ((Integer) cst).intValue();
			return newInteger(val);
		} else if (cst instanceof Float) {
			float val = ((Float) cst).floatValue();
			return newFloat(val);
		} else if (cst instanceof Long) {
			long val = ((Long) cst).longValue();
			return newLong(val);
		} else if (cst instanceof Double) {
			double val = ((Double) cst).doubleValue();
			return newDouble(val);
		} else if (cst instanceof String) {
			return newString((String) cst);
		} else if (cst instanceof Type) {
			Type t = (Type) cst;
			return newClass(t.getSort() == Type.OBJECT ? t.getInternalName()
					: t.getDescriptor());
		} else {
			throw new IllegalArgumentException("value " + cst);
		}
	}