Class JavaObjectWrapper

java.lang.Object
org.mozilla.javascript.ScriptableObject
org.lobobrowser.js.JavaObjectWrapper
All Implemented Interfaces:
Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable, org.mozilla.javascript.SymbolScriptable

public class JavaObjectWrapper extends org.mozilla.javascript.ScriptableObject
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject

    org.mozilla.javascript.ScriptableObject.KeyComparator
  • 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
     
    JavaObjectWrapper(JavaClassWrapper classWrapper, Object delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    get(int index, org.mozilla.javascript.Scriptable start)
     
    get(String name, org.mozilla.javascript.Scriptable start)
     
     
    static org.mozilla.javascript.Function
    getConstructor(String className, JavaClassWrapper classWrapper, org.mozilla.javascript.Scriptable scope)
     
    static org.mozilla.javascript.Function
    getConstructor(String className, JavaClassWrapper classWrapper, org.mozilla.javascript.Scriptable scope, JavaInstantiator instantiator)
     
     
    Returns the Java object.
    void
    put(int index, org.mozilla.javascript.Scriptable start, Object value)
     
    void
    put(String name, org.mozilla.javascript.Scriptable start, Object value)
     
     

    Methods inherited from class org.mozilla.javascript.ScriptableObject

    applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size

    Methods inherited from class java.lang.Object

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

  • Method Details

    • getJavaObject

      public Object getJavaObject()
      Returns the Java object.
      Returns:
      An object or null if garbage collected.
    • getClassName

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

      public Object get(int index, org.mozilla.javascript.Scriptable start)
      Specified by:
      get in interface org.mozilla.javascript.Scriptable
      Overrides:
      get in class org.mozilla.javascript.ScriptableObject
    • 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(int index, org.mozilla.javascript.Scriptable start, Object value)
      Specified by:
      put in interface org.mozilla.javascript.Scriptable
      Overrides:
      put 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
    • getConstructor

      public static org.mozilla.javascript.Function getConstructor(String className, JavaClassWrapper classWrapper, org.mozilla.javascript.Scriptable scope)
    • getConstructor

      public static org.mozilla.javascript.Function getConstructor(String className, JavaClassWrapper classWrapper, org.mozilla.javascript.Scriptable scope, JavaInstantiator instantiator)
    • getDefaultValue

      public Object getDefaultValue(Class hint)
      Specified by:
      getDefaultValue in interface org.mozilla.javascript.Scriptable
      Overrides:
      getDefaultValue in class org.mozilla.javascript.ScriptableObject
    • toString

      public String toString()
      Overrides:
      toString in class Object