Class JsScopeContext

  • All Implemented Interfaces:
    java.io.Serializable

    public class JsScopeContext
    extends java.lang.Object
    implements java.io.Serializable
    $Id: JsScopeContext.java 1714 2011-09-22 20:38:30Z hielke.hoeve $

    JsScopeContext defines the following JsScope contents:

    • all accessible variables from a JsScope
    • all JavaScript statements executed in the JsScope

    Since:
    0.7
    Author:
    Lionel Armanet
    See Also:
    JsScope, JsStatement, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      JsScopeContext​(java.lang.String... scopeVariables)
      Creates a new JsScopeContext with the given arguments.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      JsStatement append​(java.lang.CharSequence javascriptCode)
      Creates a new JsStatement and append the given JavaScript code in this statement.
      JsStatement self()
      Creates a new JsStatement and append the "this" keyword in this statement.
      JsStatement var​(java.lang.String variable)
      Creates a new JsStatement and append the given variable name in this statement.
      • Methods inherited from class java.lang.Object

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

      • JsScopeContext

        public JsScopeContext​(java.lang.String... scopeVariables)
        Creates a new JsScopeContext with the given arguments.
    • Method Detail

      • var

        public JsStatement var​(java.lang.String variable)
        Creates a new JsStatement and append the given variable name in this statement.
        Returns:
        the created JsStatement.
      • append

        public JsStatement append​(java.lang.CharSequence javascriptCode)
        Creates a new JsStatement and append the given JavaScript code in this statement.
        Returns:
        the created JsStatement.