Class ScriptableMap
java.lang.Object
org.mozilla.javascript.NativeJavaObject
com.randomnoun.common.jessop.engine.rhino.ScriptableMap
- All Implemented Interfaces:
Serializable
,org.mozilla.javascript.Scriptable
,org.mozilla.javascript.Wrapper
ScriptableMap is a wrapper for java.util.Map instances that allows developers
to interact with them as if it were a native JavaScript object.
- See Also:
-
Field Summary
Fields inherited from class org.mozilla.javascript.NativeJavaObject
javaObject, members, parent, prototype, staticType
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(int index) void
get
(int index, org.mozilla.javascript.Scriptable start) getDefaultValue
(Class typeHint) Object[]
getIds()
getMap()
boolean
has
(int index, org.mozilla.javascript.Scriptable start) boolean
static void
init
(org.mozilla.javascript.Scriptable scope) protected void
initPrototype
(org.mozilla.javascript.Scriptable scope) Set the prototype to the Object prototype so we can use object methods such as getOwnPropertyNames, hasOwnProperty, keys etc.void
void
toString()
unwrap()
Methods inherited from class org.mozilla.javascript.NativeJavaObject
canConvert, coerceType, getParentScope, getPrototype, hasInstance, initMembers, setParentScope, setPrototype, wrap
-
Constructor Details
-
ScriptableMap
-
-
Method Details
-
init
- Throws:
NoSuchMethodException
-
initPrototype
Set the prototype to the Object prototype so we can use object methods such as getOwnPropertyNames, hasOwnProperty, keys etc.- Parameters:
scope
- the global scope for looking up the Object constructor
-
get
- Specified by:
get
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
get
in classorg.mozilla.javascript.NativeJavaObject
-
get
- Specified by:
get
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
get
in classorg.mozilla.javascript.NativeJavaObject
-
has
- Specified by:
has
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
has
in classorg.mozilla.javascript.NativeJavaObject
-
has
- Specified by:
has
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
has
in classorg.mozilla.javascript.NativeJavaObject
-
put
- Specified by:
put
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
put
in classorg.mozilla.javascript.NativeJavaObject
-
put
- Specified by:
put
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
put
in classorg.mozilla.javascript.NativeJavaObject
-
delete
- Specified by:
delete
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
delete
in classorg.mozilla.javascript.NativeJavaObject
-
delete
- Specified by:
delete
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
delete
in classorg.mozilla.javascript.NativeJavaObject
-
getIds
- Specified by:
getIds
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
getIds
in classorg.mozilla.javascript.NativeJavaObject
-
toString
-
getDefaultValue
- Specified by:
getDefaultValue
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
getDefaultValue
in classorg.mozilla.javascript.NativeJavaObject
-
unwrap
- Specified by:
unwrap
in interfaceorg.mozilla.javascript.Wrapper
- Overrides:
unwrap
in classorg.mozilla.javascript.NativeJavaObject
-
getMap
-
getClassName
- Specified by:
getClassName
in interfaceorg.mozilla.javascript.Scriptable
- Overrides:
getClassName
in classorg.mozilla.javascript.NativeJavaObject
-