PsiType (@NotNull PsiClass builderClass, boolean setUnset) { final PsiClassType type = myElementFactory.createTypeByFQClassName( setUnset ? SET_FQN : UNSET_FQN, builderClass.getResolveScope() ); final PsiType[] mappings = PsiType.createArray(builderClass.getTypeParameters().length); Arrays.fill(mappings, type); return myElementFactory.createType(builderClass, mappings); }