Class GraalPyContextConfiguration

java.lang.Object
io.micronaut.context.python.GraalPyContextConfiguration

@ConfigurationProperties("graalpy.context") public final class GraalPyContextConfiguration extends Object
Configuration options for the GraalPy context.
Since:
5.2.0
  • Field Details

  • Method Details

    • getBuilder

      public org.graalvm.polyglot.Context.Builder getBuilder()
      Returns:
      The builder
    • getOptions

      public Map<String,String> getOptions()
      The configured options.
      Returns:
      The options
    • getHostClassLookup

      public List<String> getHostClassLookup()
      The package prefixes Python code may look up through java.type and import.

      Empty, the default, means no restriction: every class the application class loader can load is visible, whatever its package. The list is an opt-in hardening knob for applications that run Python code they trust less than their Java code; an application that sets it must list its own packages (the generated Python code looks up the application's Java classes by name) and every library package its Python code touches.

      Returns:
      The allowed package prefixes, empty for no restriction