use of com.intellij.psi.PsiEllipsisType in project intellij-community by JetBrains.
the class StreamingJsonBuilderDelegateContributor method processDynamicMethods.
@Override
boolean processDynamicMethods(@NotNull PsiType qualifierType, @NotNull PsiClass clazz, @NotNull String name, @NotNull PsiElement place, @NotNull Processor<PsiElement> processor) {
GrLightMethodBuilder method;
// (Object...)
method = createMethod(name, place, clazz);
method.addParameter("values", new PsiEllipsisType(TypeUtils.getObjectType(place)));
if (!processor.process(method))
return false;
// (Closure)
method = createMethod(name, place, clazz);
addClosureParameter(method);
if (!processor.process(method))
return false;
// (Iterable, Closure)
method = createMethod(name, place, clazz);
method.addParameter("values", TypesUtil.createIterableType(place, null));
addClosureParameter(method);
if (!processor.process(method))
return false;
// (Object[], Closure)
method = createMethod(name, place, clazz);
method.addParameter("values", TypesUtil.getJavaLangObject(place).createArrayType());
addClosureParameter(method);
if (!processor.process(method))
return false;
// (Object, Closure)
method = createMethod(name, place, clazz);
method.addParameter("value", TypesUtil.getJavaLangObject(place));
addClosureParameter(method);
return processor.process(method);
}
Aggregations