Class ShellContextFactory

java.lang.Object
org.mozilla.javascript.ContextFactory
org.mozilla.javascript.tools.shell.ShellContextFactory

public class ShellContextFactory extends ContextFactory
  • Constructor Details

    • ShellContextFactory

      public ShellContextFactory()
  • Method Details

    • hasFeature

      protected boolean hasFeature(Context cx, int featureIndex)
      Description copied from class: ContextFactory
      Implementation of Context.hasFeature(int featureIndex). This can be used to customize Context without introducing additional subclasses.
      Overrides:
      hasFeature in class ContextFactory
    • onContextCreated

      protected void onContextCreated(Context cx)
      Overrides:
      onContextCreated in class ContextFactory
    • setStrictMode

      public void setStrictMode(boolean flag)
    • setWarningAsError

      public void setWarningAsError(boolean flag)
    • setLanguageVersion

      public void setLanguageVersion(int version)
    • setOptimizationLevel

      public void setOptimizationLevel(int optimizationLevel)
    • setErrorReporter

      public void setErrorReporter(ErrorReporter errorReporter)
    • setGeneratingDebug

      public void setGeneratingDebug(boolean generatingDebug)
    • getCharacterEncoding

      public String getCharacterEncoding()
    • setCharacterEncoding

      public void setCharacterEncoding(String characterEncoding)
    • setAllowReservedKeywords

      public void setAllowReservedKeywords(boolean allowReservedKeywords)