Interface ScriptEngine

All Superinterfaces:
,

public interface ScriptEngine extends
A script language implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
     
    <FactoryType>
    FactoryType
     name,  code, ScriptContext<FactoryType> context, <,​> params)
    Compiles a script.
    Script contexts supported by this engine.
    The language name used in the script APIs to refer to this scripting backend.
  • Method Details

    • getType

       getType()
      The language name used in the script APIs to refer to this scripting backend.
    • compile

      <FactoryType> FactoryType compile( name,  code, ScriptContext<FactoryType> context, <,​> params)
      Compiles a script.
      Parameters:
      name - the name of the script. null if it is anonymous (inline). For a stored script, its the identifier.
      code - actual source of the script
      context - the context this script will be used for
      params - compile-time parameters (such as flags to the compiler)
      Returns:
      A compiled script of the FactoryType from ScriptContext
    • close

      default void close() throws
      Specified by:
       in interface 
      Specified by:
       in interface 
      Throws:
    • getSupportedContexts

      <ScriptContext<?>> getSupportedContexts()
      Script contexts supported by this engine.