public class ClosureUtils extends Object
Handy methods when working with Closure AST data structures.
| Type Params | Return Type | Name and description | 
|---|---|---|
 | 
                            public static String | 
                            convertClosureToSource(ReaderSource readerSource, ClosureExpression expression)Converts a ClosureExpression into the String source.  | 
                        
 | 
                            public static Parameter[] | 
                            getParametersSafe(ClosureExpression ce)
  | 
                        
 | 
                            public static String | 
                            getResolveStrategyName(int resolveStrategy)Returns the constant name associated with the given resolve strategy.  | 
                        
 | 
                            public static boolean | 
                            hasImplicitParameter(ClosureExpression ce)
  | 
                        
 | 
                            public static boolean | 
                            hasSingleCharacterArg(Closure c)Does the Closure have a single char-like (char or Character) argument.  | 
                        
 | 
                            public static boolean | 
                            hasSingleStringArg(Closure c)Does the Closure have a single String argument.  | 
                        
Converts a ClosureExpression into the String source.
readerSource -  a sourceexpression -  a closure. Can't be null
Returns the constant name associated with the given resolve strategy.
Does the Closure have a single char-like (char or Character) argument.
c -  a ClosureDoes the Closure have a single String argument.
c -  a Closure