Class JavaScriptEngine.HtmlUnitContextAction

  • All Implemented Interfaces:
    org.htmlunit.corejs.javascript.ContextAction<java.lang.Object>
    Enclosing class:
    JavaScriptEngine

    private abstract class JavaScriptEngine.HtmlUnitContextAction
    extends java.lang.Object
    implements org.htmlunit.corejs.javascript.ContextAction<java.lang.Object>
    Facility for ContextAction usage. ContextAction should be preferred because according to Rhino doc it "guarantees proper association of Context instances with the current thread and is faster".
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private HtmlPage page_  
      private org.htmlunit.corejs.javascript.Scriptable scope_  
    • Constructor Summary

      Constructors 
      Constructor Description
      HtmlUnitContextAction​(org.htmlunit.corejs.javascript.Scriptable scope, HtmlPage page)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.lang.Object doRun​(org.htmlunit.corejs.javascript.Context cx)  
      protected abstract java.lang.String getSourceCode​(org.htmlunit.corejs.javascript.Context cx)  
      java.lang.Object run​(org.htmlunit.corejs.javascript.Context cx)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • scope_

        private final org.htmlunit.corejs.javascript.Scriptable scope_
    • Constructor Detail

      • HtmlUnitContextAction

        HtmlUnitContextAction​(org.htmlunit.corejs.javascript.Scriptable scope,
                              HtmlPage page)
    • Method Detail

      • run

        public final java.lang.Object run​(org.htmlunit.corejs.javascript.Context cx)
        Specified by:
        run in interface org.htmlunit.corejs.javascript.ContextAction<java.lang.Object>
      • doRun

        protected abstract java.lang.Object doRun​(org.htmlunit.corejs.javascript.Context cx)
      • getSourceCode

        protected abstract java.lang.String getSourceCode​(org.htmlunit.corejs.javascript.Context cx)