Class JavaObjectWrapper

  • All Implemented Interfaces:
    java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

    public class JavaObjectWrapper
    extends org.mozilla.javascript.ScriptableObject
    See Also:
    Serialized Form
    • 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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(int index, org.mozilla.javascript.Scriptable start)  
      java.lang.Object get​(java.lang.String name, org.mozilla.javascript.Scriptable start)  
      java.lang.String getClassName()  
      static org.mozilla.javascript.Function getConstructor​(java.lang.String className, JavaClassWrapper classWrapper, org.mozilla.javascript.Scriptable scope)  
      static org.mozilla.javascript.Function getConstructor​(java.lang.String className, JavaClassWrapper classWrapper, org.mozilla.javascript.Scriptable scope, JavaInstantiator instantiator)  
      java.lang.Object getDefaultValue​(java.lang.Class hint)  
      java.lang.Object getJavaObject()
      Returns the Java object.
      void put​(int index, org.mozilla.javascript.Scriptable start, java.lang.Object value)  
      void put​(java.lang.String name, org.mozilla.javascript.Scriptable start, java.lang.Object value)  
      java.lang.String toString()  
      • 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, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, equivalentValues, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
      • Methods inherited from class java.lang.Object

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

      • JavaObjectWrapper

        public JavaObjectWrapper​(JavaClassWrapper classWrapper)
                          throws java.lang.InstantiationException,
                                 java.lang.IllegalAccessException
        Throws:
        java.lang.InstantiationException
        java.lang.IllegalAccessException
      • JavaObjectWrapper

        public JavaObjectWrapper​(JavaClassWrapper classWrapper,
                                 java.lang.Object delegate)
    • Method Detail

      • getJavaObject

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

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

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

        public void put​(java.lang.String name,
                        org.mozilla.javascript.Scriptable start,
                        java.lang.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​(java.lang.String className,
                                                                     JavaClassWrapper classWrapper,
                                                                     org.mozilla.javascript.Scriptable scope)
      • getConstructor

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object