Class EventAdapter

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

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object addListener​(java.lang.String type, java.lang.Object function)  
      java.lang.Object addSyncListener​(java.lang.String type, java.lang.Object function)  
      static java.lang.String classToSignature​(java.lang.Class<?> clazz)
      Convert Java class to "Lname-with-dots-replaced-by-slashes;" form suitable for use as JVM type signatures.
      boolean emit​(java.lang.String type, java.lang.Object... args)  
      static boolean emit​(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)  
      static java.lang.Class<?> getAdapterClass​(java.lang.Object[] classes, java.util.Map<?,​?> overrides)  
      java.lang.String getClassName()  
      java.lang.Object getImpl()  
      static java.lang.String getSignature​(java.lang.Class<?>[] paramTypes, java.lang.Class<?> returnType)  
      static java.lang.Object jsConstructor​(org.mozilla.javascript.Context cx, java.lang.Object[] args, org.mozilla.javascript.Function function, boolean inNewExpr)  
      java.lang.Object removeAllListeners​(java.lang.String type)  
      java.lang.Object removeListener​(java.lang.String type, java.lang.Object callback)  
      static java.lang.String toEventName​(java.lang.Object name)  
      • 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, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, 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, put, 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, toString, wait, wait, wait
    • Constructor Detail

      • EventAdapter

        public EventAdapter()
      • EventAdapter

        public EventAdapter​(RhinoEngine engine)
    • Method Detail

      • getClassName

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

        @JSConstructor
        public static java.lang.Object jsConstructor​(org.mozilla.javascript.Context cx,
                                                     java.lang.Object[] args,
                                                     org.mozilla.javascript.Function function,
                                                     boolean inNewExpr)
      • getImpl

        @JSGetter
        public java.lang.Object getImpl()
      • addListener

        @JSFunction
        public java.lang.Object addListener​(java.lang.String type,
                                            java.lang.Object function)
      • addSyncListener

        @JSFunction
        public java.lang.Object addSyncListener​(java.lang.String type,
                                                java.lang.Object function)
      • removeListener

        @JSFunction
        public java.lang.Object removeListener​(java.lang.String type,
                                               java.lang.Object callback)
      • removeAllListeners

        @JSFunction
        public java.lang.Object removeAllListeners​(java.lang.String type)
      • emit

        @JSFunction
        public static boolean emit​(org.mozilla.javascript.Context cx,
                                   org.mozilla.javascript.Scriptable thisObj,
                                   java.lang.Object[] args,
                                   org.mozilla.javascript.Function funObj)
      • emit

        public boolean emit​(java.lang.String type,
                            java.lang.Object... args)
      • getAdapterClass

        public static java.lang.Class<?> getAdapterClass​(java.lang.Object[] classes,
                                                         java.util.Map<?,​?> overrides)
      • toEventName

        public static java.lang.String toEventName​(java.lang.Object name)
      • getSignature

        public static java.lang.String getSignature​(java.lang.Class<?>[] paramTypes,
                                                    java.lang.Class<?> returnType)
      • classToSignature

        public static java.lang.String classToSignature​(java.lang.Class<?> clazz)
        Convert Java class to "Lname-with-dots-replaced-by-slashes;" form suitable for use as JVM type signatures. This includes support for arrays and primitive types such as int or boolean.
        Parameters:
        clazz - the class
        Returns:
        the signature