private static boolean processMethod( @NotNull GrTypeDefinition grType, @NotNull PsiScopeProcessor processor, @NotNull ResolveState state, @NotNull PsiElement place, boolean processInstanceMethods, @NotNull PsiSubstitutor substitutor, @NotNull PsiElementFactory factory, @NotNull LanguageLevel level, boolean placeGroovy, @NotNull CandidateInfo info) { PsiMethod method = (PsiMethod) info.getElement(); if (!processInstanceMember(processInstanceMethods, method) || isSameDeclaration(place, method) || !isMethodVisible(placeGroovy, method)) { return true; } LOG.assertTrue(method.getContainingClass() != null); final PsiSubstitutor finalSubstitutor = PsiClassImplUtil.obtainFinalSubstitutor( method.getContainingClass(), info.getSubstitutor(), grType, substitutor, factory, level); return processor.execute(method, state.put(PsiSubstitutor.KEY, finalSubstitutor)); }