reader.accept(new EmptyClassVisitor() {
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
// The read method
if (desc.startsWith("(Ljava/io/DataInput")) {
return new EmptyMethodVisitor() {
public void visitMethodInsn(int opcode, String owner, String name, String desc) {
if (opcode == Opcodes.INVOKESPECIAL && isConstructor(name)) {
String className = owner.replace('/', '.');
// Use signature to distinguish between constructors