Package com.avoka.core.groovy.runtime
Class SecureGroovyCompiler
java.lang.Object
com.avoka.core.groovy.runtime.SecureGroovyCompiler
Provides a Secure Groovy Compiler.
- Since:
- 17.10.0
-
Constructor Summary
ConstructorDescriptionSecureGroovyCompiler
(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
Modifier and TypeMethodDescriptionstatic boolean
hasPackageDeclarations
(String script) Return true if the script has multiple package declarations.
-
Constructor Details
-
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 Details
-
hasPackageDeclarations
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
- Returns:
- the script class
-