void (@NotNull PsiType qualifierType, @NotNull PsiElement place, @NotNull PsiScopeProcessor processor, @NotNull ResolveState state) { List<PsiAnnotation> annotations = new ArrayList<>(); List<PsiModifierListOwner> parents = PsiTreeUtil.collectParents(place, PsiModifierListOwner.class, true, (element) -> false); for (PsiModifierListOwner parent : parents) { PsiModifierList modifierList = parent.getModifierList(); if (modifierList == null) { continue; } PsiAnnotation anno = modifierList.findAnnotation(SPOCK_UTIL_MOP_USE); if (anno != null) { annotations.add(anno); } } if (annotations.isEmpty()) { return; } List<PsiClass> categoryClasses = ContainerUtil.flatMap(annotations, (annotation) -> GrAnnotationUtil.getClassArrayValue(annotation, "value", true)); if (categoryClasses.isEmpty()) { return; } List<GdkMethodHolder> holders = ContainerUtil.map(categoryClasses, (categoryClass) -> GdkMethodHolder.getHolderForClass(categoryClass, true)); for (GdkMethodHolder categoryHolder : holders) { if (!categoryHolder.processMethods(processor, state, qualifierType, place.getProject())) { return; } } }