PsiType (ArgInfo<? extends PsiElement> arg, PsiManager manager, GlobalSearchScope resolveScope) { if (arg.isMultiArg) { if (arg.args.isEmpty()) return LazyFqnClassType.getLazyType(CommonClassNames.JAVA_LANG_OBJECT, LanguageLevel.JDK_1_5, resolveScope, JavaPsiFacade.getInstance(manager.getProject())).createArrayType(); PsiType leastUpperBound = null; PsiElement first = arg.args.get(0); if (first instanceof GrNamedArgument) { GrNamedArgument[] args=new GrNamedArgument[arg.args.size()]; for (int i = 0, size = arg.args.size(); i < size; i++) { args[i] = (GrNamedArgument)arg.args.get(i); } return GrMapType.createFromNamedArgs(first, args); } else { for (PsiElement elem : arg.args) { if (elem instanceof GrExpression) { leastUpperBound = TypesUtil.getLeastUpperBoundNullable(leastUpperBound, ((GrExpression)elem).getType(), manager); } } if (leastUpperBound == null) return null; return leastUpperBound.createArrayType(); } } else { if (arg.args.isEmpty()) return null; PsiElement elem = arg.args.get(0); if (elem instanceof GrExpression) { return ((GrExpression)elem).getType(); } return null; } }