private final String fName; private final String fDesc; public AddFieldAdapter(ClassVisitor cv, int fAcc, String fName, String fDesc) { super(cv); this.fAcc = fAcc; this.fName = fName; this.fDesc = fDesc; } @Override public void visitEnd() { FieldVisitor fv = cv.visitField(fAcc, fName, fDesc, null, null); if (fv != null) { fv.visitEnd(); } cv.visitEnd(); } } Most methods delegate to ClassVisitor "Simulate" a field read from the input class after everything else