MethodVisitor (int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor methodvisitor = cv.visitMethod(access, name, desc, signature, exceptions); boolean isStatic = (access & ACC_STATIC) != 0; if (isStatic && name.equals("<clinit>")) { myHasStaticInitializer = true; return new ErrorPostponingMethodVisitor(this, name, methodvisitor) { @Override public void visitCode() { super.visitCode(); patchStaticInitializer(mv); } }; } if ((access & Opcodes.ACC_BRIDGE) == 0) { Type[] argTypes = Type.getArgumentTypes(desc); Type returnType = Type.getReturnType(desc); if (isCandidate(argTypes, returnType)) { int offset = !"<init>".equals(name) ? 0 : myEnum ? 2 : myInner ? 1 : 0; return new InstrumentationAdapter(this, methodvisitor, argTypes, returnType, myClassName, name, myDoAssert, isStatic, offset); } } return new ErrorPostponingMethodVisitor(this, name, methodvisitor); }