コード例 #1
0
 @NotNull
 private ClosureExpression createGroovyTruthClosureExpression(VariableScope scope) {
   ClosureExpression result =
       new ClosureExpression(params(param(OBJECT_TYPE, "it")), returnS(varX("it")));
   result.setVariableScope(scope.copy());
   return result;
 }
コード例 #2
0
 protected Expression transformClosureExpression(ClosureExpression ce) {
   boolean oldInClosure = inClosure;
   inClosure = true;
   Statement code = ce.getCode();
   if (code != null) code.visit(this);
   inClosure = oldInClosure;
   return ce;
 }