PsiType (PsiType elementType, List<TypeAnnotationProvider> providers, boolean ellipsis) { PsiType result = elementType; for (int i = providers.size() - 1; i >= 0; i--) { TypeAnnotationProvider provider = providers.get(i); result = ellipsis && i == 0 ? new PsiEllipsisType(result, provider) : new PsiArrayType(result, provider); } providers.clear(); return result; }