void (@NotNull PsiClass aClass) { if (!TestUtils.isParameterizedTest(aClass)) { return; } final Project project = aClass.getProject(); final PsiClass iterableClass = JavaPsiFacade.getInstance(project).findClass(CommonClassNames.JAVA_LANG_ITERABLE, GlobalSearchScope.allScope(project)); if (iterableClass == null) { return; } int methodFound = 0; for (PsiMethod method : aClass.getMethods()) { if (!AnnotationUtil.isAnnotated(method, PARAMETERS_FQN, 0)) { continue; } methodFound++; final boolean notPublic = !method.hasModifierProperty(PsiModifier.PUBLIC); final boolean notStatic = !method.hasModifierProperty(PsiModifier.STATIC); PsiType returnType = method.getReturnType(); final PsiClass returnTypeClass = PsiUtil.resolveClassInType(returnType); final boolean objectArray = returnType instanceof PsiArrayType && returnType.getDeepComponentType().equalsToText(CommonClassNames.JAVA_LANG_OBJECT); final boolean iterable = returnTypeClass != null && InheritanceUtil.isInheritorOrSelf(returnTypeClass, iterableClass, true); final String signatureText; if (!objectArray && !iterable) { signatureText = "public static Iterable<Object[]> " + method.getName() + "()"; returnType = JavaPsiFacade.getElementFactory(project) .createTypeFromText(CommonClassNames.JAVA_LANG_ITERABLE + "<java.lang.Object[]>", method); } else { signatureText = "public static " + returnType.getPresentableText() + " " + method.getName() + "()"; } if (notPublic || notStatic || (!objectArray && !iterable)) { registerMethodError(method, signatureText, returnType); } } if (methodFound == 0) { registerClassError(aClass, aClass); } else if (methodFound > 1) { registerClassError(aClass); } }