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;
int s = t.getSort();
if (s == Type.OBJECT) {
return newClass(t.getInternalName());
} else if (s == Type.METHOD) {
return newMethodType(t.getDescriptor());
} else { // s == primitive type or array
return newClass(t.getDescriptor());
}
} else if (cst instanceof Handle) {
Handle h = (Handle) cst;
return newHandle(h.getTag(), h.getOwner(), h.getName(), h.getDesc());
} else {