Class SecureCompilerConfiguration

java.lang.Object
org.codehaus.groovy.control.CompilerConfiguration
com.avoka.core.groovy.runtime.SecureCompilerConfiguration
Direct Known Subclasses:
UnitTestSecureCompilerConfiguration

public class SecureCompilerConfiguration extends org.codehaus.groovy.control.CompilerConfiguration
Provides a Secure Compiler Configuration.
Since:
5.0.0
  • Field Summary

    Fields inherited from class org.codehaus.groovy.control.CompilerConfiguration

    ALLOWED_JDKS, ASM_API_VERSION, DEFAULT, DEFAULT_SOURCE_ENCODING, GROOVYDOC, INVOKEDYNAMIC, JDK_TO_BYTECODE_VERSION_MAP, JDK10, JDK11, JDK12, JDK13, JDK14, JDK15, JDK16, JDK17, JDK4, JDK5, JDK6, JDK7, JDK8, JDK9, MEM_STUB, PARALLEL_PARSE, POST_JDK5, PRE_JDK5, RUNTIME_GROOVYDOC
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a Secure Compiler Configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addImporWhiteList(String whitelistImport)
    Add the import statement to the imports whitelist.
    void
    addStarImporWhiteList(Set<String> whiteListImports)
    Add the import statement to the imports whitelist.
    protected List<String>
    getPropertyList(Properties properties, String propertyName)
     
     
    void
    setSecurityContext(String securityContext)
     

    Methods inherited from class org.codehaus.groovy.control.CompilerConfiguration

    addCompilationCustomizers, configure, getBytecodePostprocessor, getClasspath, getCompilationCustomizers, getDebug, getDefaultScriptExtension, getDisabledGlobalASTTransformations, getJointCompilationOptions, getMinimumRecompilationInterval, getOptimizationOptions, getOutput, getParameters, getPluginFactory, getRecompileGroovySource, getScriptBaseClass, getScriptExtensions, getSourceEncoding, getTargetBytecode, getTargetDirectory, getTolerance, getVerbose, getWarningLevel, isGroovydocEnabled, isIndyEnabled, isPostJDK5, isPostJDK7, isPostJDK8, isPostJDK9, isPreviewFeatures, isRuntimeGroovydocEnabled, setBytecodePostprocessor, setClasspath, setClasspathList, setDebug, setDefaultScriptExtension, setDisabledGlobalASTTransformations, setJointCompilationOptions, setMinimumRecompilationInterval, setOptimizationOptions, setOutput, setParameters, setPluginFactory, setPreviewFeatures, setRecompileGroovySource, setScriptBaseClass, setScriptExtensions, setSourceEncoding, setTargetBytecode, setTargetDirectory, setTargetDirectory, setTolerance, setVerbose, setWarningLevel

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SecureCompilerConfiguration

      public SecureCompilerConfiguration()
      Create a Secure Compiler Configuration.
  • Method Details

    • addImporWhiteList

      public void addImporWhiteList(String whitelistImport)
      Add the import statement to the imports whitelist.
      Parameters:
      whitelistImport - the import to add to the secure whitelist
    • addStarImporWhiteList

      public void addStarImporWhiteList(Set<String> whiteListImports)
      Add the import statement to the imports whitelist.
      Parameters:
      whiteListImports - the import to add to the secure whitelist
    • setSecurityContext

      public void setSecurityContext(String securityContext)
      Parameters:
      securityContext - the class loader security context
      Since:
      17.10.0
    • getSecurityContext

      public String getSecurityContext()
      Returns:
      the class loader security context
      Since:
      17.10.0
    • getPropertyList

      protected List<String> getPropertyList(Properties properties, String propertyName)