void (@NotNull PsiForeachStatement statement) { if (myExpr.equals(statement.getIteratedValue())) { PsiParameter iterationParameter = statement.getIterationParameter(); PsiType type = iterationParameter.getType(); if (PsiTypes.nullType().equals(type)) return; PsiType arrayType = type.createArrayType(); myResult.add(createInfoImpl(arrayType, arrayType)); PsiManager manager = statement.getManager(); PsiElementFactory factory = JavaPsiFacade.getElementFactory(manager.getProject()); PsiClass iterableClass = JavaPsiFacade.getInstance(manager.getProject()).findClass("java.lang.Iterable", statement.getResolveScope()); if (iterableClass != null && iterableClass.getTypeParameters().length == 1) { Map<PsiTypeParameter, PsiType> map = new HashMap<>(); map.put(iterableClass.getTypeParameters()[0], PsiWildcardType.createExtends(manager, type)); PsiType iterableType = factory.createType(iterableClass, factory.createSubstitutor(map)); myResult.add(createInfoImpl(iterableType, iterableType)); } } }