// adapts the class on the fly
try {
//modify class
ClassReader cr = new ClassReader(is);
ClassWriter cw = new ClassWriter(0);
ClassVisitor cv = new ClassModifierClassAdapter(cw, modifier);
modifier.setClassWriter(cw);
cr.accept(cv, 0);
modifiedClassBytes = cw.toByteArray();
} catch (Exception e) {