Groovy Documentation

org.grules.ast
[Groovy] Class ClosureWrapper

java.lang.Object
  org.grules.ast.ClosureWrapper

class ClosureWrapper

Wraps method calls into closures.


Method Summary
static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.MethodCallExpression expression)

Wraps a method call into a function term.

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.TernaryExpression expression)

Wraps a ternary operator into a term.

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.VariableExpression expression)

Creates a method call with a name of the given variable and wraps it into a closure.

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.GStringExpression expression)

Creates a method call with a name of the passed string and wraps it into a closure.

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.BinaryExpression expression)

Traverses a binary expression and wraps its leaves into closures.

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.UnaryMinusExpression expression)

Wraps an inner expression of an unary minus expression into a closure.

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.BitwiseNegationExpression expression)

Wraps an inner expression of a bitwise negation expression into a closure.

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.Expression expression)

Expressions of unsupported types are not wrapped.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

wrapInClosures

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.MethodCallExpression expression)
Wraps a method call into a function term.


wrapInClosures

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.TernaryExpression expression)
Wraps a ternary operator into a term.


wrapInClosures

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.VariableExpression expression)
Creates a method call with a name of the given variable and wraps it into a closure.


wrapInClosures

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.GStringExpression expression)
Creates a method call with a name of the passed string and wraps it into a closure.


wrapInClosures

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.BinaryExpression expression)
Traverses a binary expression and wraps its leaves into closures.


wrapInClosures

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.UnaryMinusExpression expression)
Wraps an inner expression of an unary minus expression into a closure.


wrapInClosures

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.BitwiseNegationExpression expression)
Wraps an inner expression of a bitwise negation expression into a closure.


wrapInClosures

static org.codehaus.groovy.ast.expr.Expression wrapInClosures(org.codehaus.groovy.ast.expr.Expression expression)
Expressions of unsupported types are not wrapped.


 

Groovy Documentation