Method (Method method, @NotNull ClassesByNameProvider classesByName) { Ref<Method> methodRef = Ref.create(); visit(method, new MethodVisitor(Opcodes.API_VERSION) { @Override public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) { if ("java/lang/AbstractMethodError".equals(owner)) { return; } ReferenceType declaringType = method.declaringType(); owner = Type.getObjectType(owner).getClassName(); ReferenceType cls = declaringType.name().equals(owner) ? declaringType : ContainerUtil.getFirstItem(classesByName.get(owner)); if (cls != null) { methodRef.setIfNull(DebuggerUtils.findMethod(cls, name, desc)); } } }, false); return methodRef.get(); }