Class SandboxedAVM

java.lang.Object
io.jawk.backend.AVM
io.jawk.backend.SandboxedAVM
All Implemented Interfaces:
VariableManager, Closeable, AutoCloseable

public class SandboxedAVM extends AVM
AVM variant enforcing sandbox restrictions at runtime.
  • Constructor Details

    • SandboxedAVM

      public SandboxedAVM(AwkSettings parameters, Map<String,JawkExtension> extensionInstances)
      Creates a sandboxed AVM with the provided settings and extension instances.
      Parameters:
      parameters - Runtime settings to honor
      extensionInstances - Available extension implementations
    • SandboxedAVM

      public SandboxedAVM(AwkSettings parameters, Map<String,JawkExtension> extensionInstances, boolean profilingEnabled)
      Creates a sandboxed AVM with the provided settings, extension instances, and profiling mode.
      Parameters:
      parameters - Runtime settings to honor
      extensionInstances - Available extension implementations
      profilingEnabled - Whether to collect profiling statistics
  • Method Details

    • createJrt

      protected JRT createJrt()
      Description copied from class: AVM
      Creates the runtime this interpreter drives.

      Called once from the constructor, so that a subclass can install its own runtime — SandboxedAVM returns a SandboxedJRT this way. It runs before the subclass constructor body, so an override must not depend on the subclass's own fields.

      Overrides:
      createJrt in class AVM
      Returns:
      the runtime bound to this interpreter, never null