/** Constructs an {@code AbstractCallable} suitable for wrapping a method reference. */ public static CallableBuilder methodReference( CeylonTransformer gen, Tree.Term expr, ParameterList parameterList) { CallableBuilder cb = new CallableBuilder(gen); cb.paramLists = parameterList; cb.typeModel = expr.getTypeModel(); cb.forwardCallTo = expr; return cb; }
public static CallableBuilder methodArgument( CeylonTransformer gen, ProducedType callableTypeModel, ParameterList parameterList, Tree.ParameterList parameterListTree, List<JCStatement> stmts) { CallableBuilder cb = new CallableBuilder(gen); cb.paramLists = parameterList; cb.typeModel = callableTypeModel; cb.body = stmts; cb.parameterListTree = parameterListTree; return cb; }
/** * Constructs an {@code AbstractCallable} suitable for use in a method definition with a multiple * parameter list. */ public static CallableBuilder mpl( CeylonTransformer gen, ProducedType typeModel, ParameterList parameterList, Tree.ParameterList parameterListTree, List<JCStatement> body) { CallableBuilder cb = new CallableBuilder(gen); cb.paramLists = parameterList; cb.typeModel = typeModel; if (body == null) { body = List.<JCStatement>nil(); } cb.body = body; cb.parameterListTree = parameterListTree; return cb; }