Package org.ringojs.wrappers
Class EventAdapter
- java.lang.Object
-
- org.mozilla.javascript.ScriptableObject
-
- org.ringojs.wrappers.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
-
-
Constructor Summary
Constructors Constructor Description EventAdapter()
EventAdapter(RhinoEngine engine)
-
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
-
-
-
-
Constructor Detail
-
EventAdapter
public EventAdapter()
-
EventAdapter
public EventAdapter(RhinoEngine engine)
-
-
Method Detail
-
getClassName
public java.lang.String getClassName()
- Specified by:
getClassName
in interfaceorg.mozilla.javascript.Scriptable
- Specified by:
getClassName
in classorg.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
-
-