Class CompileSpec<T extends ScriptOrFn<T>>

java.lang.Object
org.htmlunit.corejs.javascript.CompileSpec<T>
Direct Known Subclasses:
FunctionCompileSpec, ScriptCompileSpec

public abstract class CompileSpec<T extends ScriptOrFn<T>> extends Object
Parameters for compiling a JavaScript script (i.e. top-level program source) or function. Build instances via ScriptCompileSpec.fromSource(String) or ScriptCompileSpec.fromReader(Reader) or FunctionCompileSpec#fromSource(String) or FunctionCompileSpec#fromReader(Reader) to create a CompileSpec.Builder, set the other properties you need on that, and then pass the built compile spec to Context.compileScript(ScriptCompileSpec) or Context.evaluateScript(ScriptCompileSpec, VarScope), or the equivalent methods for compiling functions.
See Also:
  • Constructor Details

  • Method Details

    • getSource

      public String getSource()
    • getScope

      public VarScope getScope()
    • getSourceName

      public String getSourceName()
    • getLineno

      public int getLineno()
    • getSecurityDomain

      public Object getSecurityDomain()
    • getCompiler

      public Evaluator getCompiler()
    • getCompilationErrorReporter

      public ErrorReporter getCompilationErrorReporter()
    • getCompilerEnvironsProcessor

      public Consumer<CompilerEnvirons> getCompilerEnvironsProcessor()
    • getSourceMapper

      public SourceMapper getSourceMapper()
    • getSourceCodeSupplier

      public SourceCodeSupplier getSourceCodeSupplier()