private org.hotswap.agent.javassist.bytecode.analysis.Type typeFromDesc(String desc) throws BadBytecode {
CtClass clazz = null;
try {
clazz = Descriptor.toCtClass(desc, classPool);
} catch (NotFoundException e) {
throw new BadBytecode("Could not find class in descriptor [pos = " + lastPos + "]: " + e.getMessage());
}
if (clazz == null)
throw new BadBytecode("Could not obtain type for descriptor [pos = " + lastPos + "]: " + desc);
return org.hotswap.agent.javassist.bytecode.analysis.Type.get(clazz);
}