use of org.eclipse.ceylon.compiler.java.codegen.Strategy.DefaultParameterMethodOwner in project ceylon by eclipse.
the class NamedArgumentInvocation method buildVars.
/**
* Constructs the vars used in the Let expression
*/
private void buildVars() {
if (getPrimaryDeclaration() == null) {
return;
}
boolean prev = gen.expressionGen().withinInvocation(false);
java.util.List<Tree.NamedArgument> namedArguments = namedArgumentList.getNamedArguments();
SequencedArgument sequencedArgument = namedArgumentList.getSequencedArgument();
java.util.List<ParameterList> paramLists = ((Functional) getPrimaryDeclaration()).getParameterLists();
java.util.List<Parameter> declaredParams = paramLists.get(0).getParameters();
appendVarsForNamedArguments(namedArguments, declaredParams);
appendVarsForReifiedTypeArguments();
if (sequencedArgument != null)
appendVarsForSequencedArguments(sequencedArgument, declaredParams);
boolean hasDefaulted = appendVarsForDefaulted(declaredParams);
DefaultParameterMethodOwner owner = Strategy.defaultParameterMethodOwner(getPrimaryDeclaration());
if (hasDefaulted && owner != DefaultParameterMethodOwner.STATIC && owner != DefaultParameterMethodOwner.OUTER && owner != DefaultParameterMethodOwner.OUTER_COMPANION) {
vars.prepend(makeThis());
}
gen.expressionGen().withinInvocation(prev);
}
Aggregations