Class NativeMap
- java.lang.Object
-
- org.springframework.extensions.webscripts.NativeMap
-
- All Implemented Interfaces:
org.mozilla.javascript.Scriptable,org.mozilla.javascript.Wrapper
public class NativeMap extends java.lang.Object implements org.mozilla.javascript.Scriptable, org.mozilla.javascript.WrapperWrapper for exposing maps in Rhino scripts. Note: A duplicate of this map implementation exists in the Repository project- Author:
- davidc
-
-
Constructor Summary
Constructors Constructor Description NativeMap(org.mozilla.javascript.Scriptable scope, java.util.Map<java.lang.Object,java.lang.Object> map)Construct
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(int index)voiddelete(java.lang.String name)java.lang.Objectget(int index, org.mozilla.javascript.Scriptable start)java.lang.Objectget(java.lang.String name, org.mozilla.javascript.Scriptable start)java.lang.StringgetClassName()java.lang.ObjectgetDefaultValue(java.lang.Class hint)java.lang.Object[]getIds()org.mozilla.javascript.ScriptablegetParentScope()org.mozilla.javascript.ScriptablegetPrototype()booleanhas(int index, org.mozilla.javascript.Scriptable start)booleanhas(java.lang.String name, org.mozilla.javascript.Scriptable start)booleanhasInstance(org.mozilla.javascript.Scriptable value)voidput(int index, org.mozilla.javascript.Scriptable start, java.lang.Object value)voidput(java.lang.String name, org.mozilla.javascript.Scriptable start, java.lang.Object value)voidsetParentScope(org.mozilla.javascript.Scriptable parent)voidsetPrototype(org.mozilla.javascript.Scriptable prototype)java.lang.Objectunwrap()static NativeMapwrap(org.mozilla.javascript.Scriptable scope, java.util.Map<java.lang.Object,java.lang.Object> map)Construct
-
-
-
Method Detail
-
wrap
public static NativeMap wrap(org.mozilla.javascript.Scriptable scope, java.util.Map<java.lang.Object,java.lang.Object> map)
Construct- Parameters:
scope- Scriptablemap- Map- Returns:
- native map
-
unwrap
public java.lang.Object unwrap()
- Specified by:
unwrapin interfaceorg.mozilla.javascript.Wrapper
-
getClassName
public java.lang.String getClassName()
- Specified by:
getClassNamein interfaceorg.mozilla.javascript.Scriptable
-
get
public java.lang.Object get(java.lang.String name, org.mozilla.javascript.Scriptable start)- Specified by:
getin interfaceorg.mozilla.javascript.Scriptable
-
get
public java.lang.Object get(int index, org.mozilla.javascript.Scriptable start)- Specified by:
getin interfaceorg.mozilla.javascript.Scriptable
-
has
public boolean has(java.lang.String name, org.mozilla.javascript.Scriptable start)- Specified by:
hasin interfaceorg.mozilla.javascript.Scriptable
-
has
public boolean has(int index, org.mozilla.javascript.Scriptable start)- Specified by:
hasin interfaceorg.mozilla.javascript.Scriptable
-
put
public void put(java.lang.String name, org.mozilla.javascript.Scriptable start, java.lang.Object value)- Specified by:
putin interfaceorg.mozilla.javascript.Scriptable
-
put
public void put(int index, org.mozilla.javascript.Scriptable start, java.lang.Object value)- Specified by:
putin interfaceorg.mozilla.javascript.Scriptable
-
delete
public void delete(java.lang.String name)
- Specified by:
deletein interfaceorg.mozilla.javascript.Scriptable
-
delete
public void delete(int index)
- Specified by:
deletein interfaceorg.mozilla.javascript.Scriptable
-
getPrototype
public org.mozilla.javascript.Scriptable getPrototype()
- Specified by:
getPrototypein interfaceorg.mozilla.javascript.Scriptable
-
setPrototype
public void setPrototype(org.mozilla.javascript.Scriptable prototype)
- Specified by:
setPrototypein interfaceorg.mozilla.javascript.Scriptable
-
getParentScope
public org.mozilla.javascript.Scriptable getParentScope()
- Specified by:
getParentScopein interfaceorg.mozilla.javascript.Scriptable
-
setParentScope
public void setParentScope(org.mozilla.javascript.Scriptable parent)
- Specified by:
setParentScopein interfaceorg.mozilla.javascript.Scriptable
-
getIds
public java.lang.Object[] getIds()
- Specified by:
getIdsin interfaceorg.mozilla.javascript.Scriptable
-
getDefaultValue
public java.lang.Object getDefaultValue(java.lang.Class hint)
- Specified by:
getDefaultValuein interfaceorg.mozilla.javascript.Scriptable
-
hasInstance
public boolean hasInstance(org.mozilla.javascript.Scriptable value)
- Specified by:
hasInstancein interfaceorg.mozilla.javascript.Scriptable
-
-