boolean (final HierarchicalMethodSignature signature, final PsiMethod method, final PsiClass parentClass, final boolean allowStaticMethod, final boolean checkBases, final Processor<? super MethodSignatureBackedByPsiMethod> consumer) { PsiMethod signatureMethod = signature.getMethod(); PsiClass hisClass = signatureMethod.getContainingClass(); if (parentClass == null || InheritanceUtil.isInheritorOrSelf(parentClass, hisClass, true)) { if (isAcceptable(signatureMethod, method, allowStaticMethod)) { if (parentClass != null && !parentClass.equals(hisClass) && !checkBases) { return true; } LOG.assertTrue(signatureMethod != method, method); // method != method.getsuper() return consumer.process(signature); //no need to check super classes } } for (HierarchicalMethodSignature superSignature : signature.getSuperSignatures()) { if (MethodSignatureUtil.isSubsignature(superSignature, signature)) { addSuperMethods(superSignature, method, parentClass, allowStaticMethod, checkBases, consumer); } } return true; }