Interface GroovySandbox.Scope

All Superinterfaces:
AutoCloseable
Enclosing class:
GroovySandbox
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface GroovySandbox.Scope extends AutoCloseable
Handle for exiting the dynamic scope of the Groovy sandbox.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    default groovy.lang.Script
    parse(groovy.lang.GroovyShell shell, groovy.lang.GroovyCodeSource codeSource)
    Variant of GroovyShell.parse(String) that intercepts potentially unsafe calls when the script is created.
  • Method Details

    • parse

      default groovy.lang.Script parse(groovy.lang.GroovyShell shell, groovy.lang.GroovyCodeSource codeSource)
      Variant of GroovyShell.parse(String) that intercepts potentially unsafe calls when the script is created.

      GroovySandbox.runScript(GroovyShell, String) should be used instead of this method in most cases.

    • close

      void close()
      Specified by:
      close in interface AutoCloseable