Class ScriptableBase

java.lang.Object
org.mozilla.javascript.ScriptableObject
org.apache.sling.scripting.javascript.wrapper.ScriptableBase
All Implemented Interfaces:
Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable
Direct Known Subclasses:
ScriptableCalendar, ScriptableMap, ScriptableNode, ScriptableProperty

public abstract class ScriptableBase extends org.mozilla.javascript.ScriptableObject
Base class for Scriptable objects, uses the NativeJavaObject wrapper to provide default wrapping of methods and properties (SLING-397)
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    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
    protected Object
    getNative(String name, org.mozilla.javascript.Scriptable start)
     
    protected abstract Class<?>
     
    protected abstract Object
     

    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, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, 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
  • Field Details

  • Constructor Details

    • ScriptableBase

      public ScriptableBase()
  • Method Details

    • getNative

      protected Object getNative(String name, org.mozilla.javascript.Scriptable start)
    • getWrappedObject

      protected abstract Object getWrappedObject()
      Returns:
      the Java object that we're wrapping, used to create a NativeJavaObject instance for default wrapping.
    • getStaticType

      protected abstract Class<?> getStaticType()
      Returns:
      the static type to use for NativeJavaObject wrapping