Package com.avoka.core.groovy.runtime
Class SecureGroovyCompiler
- java.lang.Object
-
- com.avoka.core.groovy.runtime.SecureGroovyCompiler
-
public class SecureGroovyCompiler extends Object
Provides a Secure Groovy Compiler.- Since:
- 17.10.0
-
-
Constructor Summary
Constructors Constructor Description SecureGroovyCompiler(String script, ClassLoader classLoader, SecureCompilerConfiguration compilerConfig)
Create secure groovy compiler.SecureGroovyCompiler(String script, ClassLoader classLoader, SecureCompilerConfiguration compilerConfig, boolean cacheClassLoader)
Create secure groovy compiler.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
getScriptClass()
static boolean
hasPackageDeclarations(String script)
Return true if the script has multiple package declarations.
-
-
-
Constructor Detail
-
SecureGroovyCompiler
public SecureGroovyCompiler(String script, ClassLoader classLoader, SecureCompilerConfiguration compilerConfig, boolean cacheClassLoader)
Create secure groovy compiler.- Parameters:
script
- the groovy script (required)classLoader
- the classloader (required)compilerConfig
- the compiler config (required)cacheClassLoader
- specify whether to cache the class loader
-
SecureGroovyCompiler
public SecureGroovyCompiler(String script, ClassLoader classLoader, SecureCompilerConfiguration compilerConfig)
Create secure groovy compiler.- Parameters:
script
- the groovy script (required)classLoader
- the classloader (required)compilerConfig
- the compiler config (required)
-
-
Method Detail
-
hasPackageDeclarations
public static boolean hasPackageDeclarations(String script)
Return true if the script has multiple package declarations.- Parameters:
script
- the groovy script to check- Returns:
- true if the script has multiple package declarations
-
getScriptClass
public Class getScriptClass()
- Returns:
- the script class
-
-