Class SandboxClosureWrapper<V>

java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.Closure<V>
com.axelor.script.SandboxClosure<V>
com.axelor.script.SandboxClosureWrapper<V>
All Implemented Interfaces:
SandboxCode, groovy.lang.GroovyCallable<V>, groovy.lang.GroovyObject, Serializable, Cloneable, Runnable, Callable<V>

public final class SandboxClosureWrapper<V> extends SandboxClosure<V>
A closure Groovy builds from a sandboxed closure (curry, >>, memoize, trampoline...), see SandboxClosure.

The closures Groovy builds are not sandboxed: their delegate and owner can be set to anything (c.memoize() then c.delegate = System, or rehydrate(System, ...)), and their properties and calls without a receiver are resolved on them. They are wrapped in this class, whose delegate and owner are validated as those of any SandboxClosure.

The calls are delegated to the closure built by Groovy, kept in a SandboxClosureWrapper.Target, a class the policy does not allow, as SandboxMethodPointer does.

See Also:
  • Method Details

    • clone

      public Object clone()
      Overrides:
      clone in class groovy.lang.Closure<V>
    • setDelegate

      public void setDelegate(Object delegate)
      Overrides:
      setDelegate in class SandboxClosure<V>
    • setResolveStrategy

      public void setResolveStrategy(int resolveStrategy)
      Overrides:
      setResolveStrategy in class groovy.lang.Closure<V>
    • trampoline

      public groovy.lang.Closure<V> trampoline(Object... arguments)
      Overrides:
      trampoline in class SandboxClosure<V>
    • trampoline

      public groovy.lang.Closure<V> trampoline()
      Overrides:
      trampoline in class SandboxClosure<V>
    • doCall

      public V doCall(Object... arguments)
    • call

      public V call(Object... arguments)
      Overrides:
      call in class groovy.lang.Closure<V>