final InputStream in = getResourceAsStream(name.replace('.', '/') + ".class");
byte[] bytes = IOHelper.read(in);
final ClassReader reader = new ClassReader(bytes);
final ClassWriter writer = new ClassWriter(0);
reader.accept(new RemappingClassAdapter(writer, ScriptMapper.getInstance()), ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
bytes = writer.toByteArray();
clazz = defineClass(name, bytes, 0, bytes.length, domain);
if (resolve) {
resolveClass(clazz);