public class ScriptableList
extends org.mozilla.javascript.NativeJavaObject
| Constructor and Description |
|---|
ScriptableList(org.mozilla.javascript.Scriptable scope,
List list)
Create a ScriptableList wrapper around a java.util.List.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(int index) |
Object |
get(int index,
org.mozilla.javascript.Scriptable start) |
Object |
get(String name,
org.mozilla.javascript.Scriptable start) |
String |
getClassName() |
Object |
getDefaultValue(Class typeHint) |
Object[] |
getIds() |
List |
getList() |
boolean |
has(int index,
org.mozilla.javascript.Scriptable start) |
static void |
init(org.mozilla.javascript.Scriptable scope) |
protected void |
initPrototype(org.mozilla.javascript.Scriptable scope)
Set the prototype to the Array prototype so we can use array methds such as
push, pop, shift, slice etc.
|
void |
put(int index,
org.mozilla.javascript.Scriptable start,
Object value) |
void |
put(String name,
org.mozilla.javascript.Scriptable start,
Object value) |
String |
toString() |
Object |
unwrap() |
public ScriptableList(org.mozilla.javascript.Scriptable scope,
List list)
scope - the scopelist - the list instancepublic static void init(org.mozilla.javascript.Scriptable scope)
throws NoSuchMethodException
NoSuchMethodExceptionprotected void initPrototype(org.mozilla.javascript.Scriptable scope)
scope - the global scope for looking up the Array constructorpublic void delete(int index)
delete in interface org.mozilla.javascript.Scriptabledelete in class org.mozilla.javascript.NativeJavaObjectpublic Object get(int index, org.mozilla.javascript.Scriptable start)
get in interface org.mozilla.javascript.Scriptableget in class org.mozilla.javascript.NativeJavaObjectpublic boolean has(int index,
org.mozilla.javascript.Scriptable start)
has in interface org.mozilla.javascript.Scriptablehas in class org.mozilla.javascript.NativeJavaObjectpublic void put(String name, org.mozilla.javascript.Scriptable start, Object value)
put in interface org.mozilla.javascript.Scriptableput in class org.mozilla.javascript.NativeJavaObjectpublic void put(int index,
org.mozilla.javascript.Scriptable start,
Object value)
put in interface org.mozilla.javascript.Scriptableput in class org.mozilla.javascript.NativeJavaObjectpublic Object get(String name, org.mozilla.javascript.Scriptable start)
get in interface org.mozilla.javascript.Scriptableget in class org.mozilla.javascript.NativeJavaObjectpublic Object[] getIds()
getIds in interface org.mozilla.javascript.ScriptablegetIds in class org.mozilla.javascript.NativeJavaObjectpublic Object getDefaultValue(Class typeHint)
getDefaultValue in interface org.mozilla.javascript.ScriptablegetDefaultValue in class org.mozilla.javascript.NativeJavaObjectpublic Object unwrap()
unwrap in interface org.mozilla.javascript.Wrapperunwrap in class org.mozilla.javascript.NativeJavaObjectpublic List getList()
public String getClassName()
getClassName in interface org.mozilla.javascript.ScriptablegetClassName in class org.mozilla.javascript.NativeJavaObjectCopyright © 2016. All rights reserved.