Class CommonJsModule

java.lang.Object
org.mozilla.javascript.ScriptableObject
org.apache.sling.scripting.sightly.js.impl.cjs.CommonJsModule
All Implemented Interfaces:
Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class CommonJsModule extends org.mozilla.javascript.ScriptableObject
CommonJS module implementation
See Also:
  • Field Summary

    Fields inherited from class org.mozilla.javascript.ScriptableObject

    CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST

    Fields inherited from interface org.mozilla.javascript.Scriptable

    NOT_FOUND
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String name, org.mozilla.javascript.Scriptable start)
     
     
     
    boolean
     
    void
    put(String name, org.mozilla.javascript.Scriptable start, Object value)
     
    void
    setExports(Object exports)
     

    Methods inherited from class org.mozilla.javascript.ScriptableObject

    associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype

    Methods inherited from class java.lang.Object

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

    • CommonJsModule

      public CommonJsModule()
  • Method Details

    • get

      public Object get(String name, org.mozilla.javascript.Scriptable start)
      Specified by:
      get in interface org.mozilla.javascript.Scriptable
      Overrides:
      get in class org.mozilla.javascript.ScriptableObject
    • put

      public void put(String name, org.mozilla.javascript.Scriptable start, Object value)
      Specified by:
      put in interface org.mozilla.javascript.Scriptable
      Overrides:
      put in class org.mozilla.javascript.ScriptableObject
    • getExports

      public Object getExports()
    • setExports

      public void setExports(Object exports)
    • isModified

      public boolean isModified()
    • getClassName

      public String getClassName()
      Specified by:
      getClassName in interface org.mozilla.javascript.Scriptable
      Specified by:
      getClassName in class org.mozilla.javascript.ScriptableObject