Top Description Constructors Methods
org.codehaus.groovy.ast.builder

public Class AstStringCompiler

extends Object
Class Inheritance
Imports
groovy.lang.GroovyClassLoader, .GroovyCodeSource, org.codehaus.groovy.ast.ASTNode, org.codehaus.groovy.ast.stmt.BlockStatement, org.codehaus.groovy.control.CompilationUnit, .CompilePhase, .CompilerConfiguration, java.security.AccessController, .PrivilegedAction, java.util.LinkedList, .List, java.util.stream.Collectors

This class handles converting Strings to ASTNode lists.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<ASTNode>
compile(String
a Groovy script in String form
script
,
CompilePhase
the int based CompilePhase to compile it to.
compilePhase
,
boolean statementsOnly)

Performs the String source to java.util.List of ASTNode.

public List<ASTNode>

Returns:

java.util.List of statement ASTNode
compile
(String
a Groovy script in String form
script
)

Performs the String source to java.util.List of statement ASTNode.

private static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AstStringCompilerback to summary
public AstStringCompiler()

Method Detail

compileback to summary
public List<ASTNode> compile(String script, CompilePhase compilePhase, boolean statementsOnly)

Performs the String source to java.util.List of ASTNode.

Parameters
script:String

a Groovy script in String form

compilePhase:CompilePhase

the int based CompilePhase to compile it to.

Returns:List<ASTNode>

java.util.List of ASTNode

compileback to summary
public List<ASTNode> compile(String script)

Performs the String source to java.util.List of statement ASTNode.

Parameters
script:String

a Groovy script in String form

Returns:List<ASTNode>

java.util.List of statement ASTNode

Since
3.0.0
makeScriptClassNameback to summary
private static String makeScriptClassName()