class JSObject extends JSObject
| Modifier and Type | Class and Description |
|---|---|
private static class |
JSObject.SelfDisposer |
| Modifier and Type | Field and Description |
|---|---|
(package private) static int |
JS_CONTEXT_OBJECT |
(package private) static int |
JS_DOM_NODE_OBJECT |
(package private) static int |
JS_DOM_WINDOW_OBJECT |
private long |
peer |
private int |
peer_type |
private static java.util.concurrent.atomic.AtomicInteger |
peerCount |
private static java.lang.String |
UNDEFINED |
| Constructor and Description |
|---|
JSObject(long peer,
int peer_type) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
call(java.lang.String methodName,
java.lang.Object... args)
Calls a JavaScript method.
|
private static java.lang.Object |
callImpl(long peer,
int peer_type,
java.lang.String methodName,
java.lang.Object[] args,
java.security.AccessControlContext acc) |
boolean |
equals(java.lang.Object other) |
java.lang.Object |
eval(java.lang.String s)
Evaluates a JavaScript expression.
|
private static java.lang.Object |
evalImpl(long peer,
int peer_type,
java.lang.String name) |
private static JSException |
fwkMakeException(java.lang.Object value) |
java.lang.Object |
getMember(java.lang.String name)
Retrieves a named member of a JavaScript object.
|
private static java.lang.Object |
getMemberImpl(long peer,
int peer_type,
java.lang.String name) |
(package private) long |
getPeer() |
java.lang.Object |
getSlot(int index)
Retrieves an indexed member of a JavaScript object.
|
private static java.lang.Object |
getSlotImpl(long peer,
int peer_type,
int index) |
int |
hashCode() |
void |
removeMember(java.lang.String name)
Removes a named member of a JavaScript object.
|
private static void |
removeMemberImpl(long peer,
int peer_type,
java.lang.String name) |
void |
setMember(java.lang.String name,
java.lang.Object value)
Sets a named member of a JavaScript object.
|
private static void |
setMemberImpl(long peer,
int peer_type,
java.lang.String name,
java.lang.Object value,
java.security.AccessControlContext acc) |
void |
setSlot(int index,
java.lang.Object value)
Sets an indexed member of a JavaScript object.
|
private static void |
setSlotImpl(long peer,
int peer_type,
int index,
java.lang.Object value,
java.security.AccessControlContext acc) |
(package private) static int |
test_getPeerCount() |
java.lang.String |
toString() |
private static java.lang.String |
toStringImpl(long peer,
int peer_type) |
private static void |
unprotectImpl(long peer,
int peer_type) |
private static final java.lang.String UNDEFINED
static final int JS_CONTEXT_OBJECT
static final int JS_DOM_NODE_OBJECT
static final int JS_DOM_WINDOW_OBJECT
private final long peer
private final int peer_type
private static java.util.concurrent.atomic.AtomicInteger peerCount
long getPeer()
static int test_getPeerCount()
private static void unprotectImpl(long peer,
int peer_type)
public java.lang.Object eval(java.lang.String s)
throws JSException
JSObjectEvaluates a JavaScript expression. The expression is a string of JavaScript source code which will be evaluated in the context given by "this".
eval in class JSObjects - The JavaScript expression.JSExceptionprivate static java.lang.Object evalImpl(long peer,
int peer_type,
java.lang.String name)
public java.lang.Object getMember(java.lang.String name)
JSObjectRetrieves a named member of a JavaScript object. Equivalent to "this.name" in JavaScript.
private static java.lang.Object getMemberImpl(long peer,
int peer_type,
java.lang.String name)
public void setMember(java.lang.String name,
java.lang.Object value)
throws JSException
JSObjectSets a named member of a JavaScript object. Equivalent to "this.name = value" in JavaScript.
setMember in class JSObjectname - The name of the JavaScript property to be accessed.value - The value of the propery.JSExceptionprivate static void setMemberImpl(long peer,
int peer_type,
java.lang.String name,
java.lang.Object value,
java.security.AccessControlContext acc)
public void removeMember(java.lang.String name)
throws JSException
JSObjectRemoves a named member of a JavaScript object. Equivalent to "delete this.name" in JavaScript.
removeMember in class JSObjectname - The name of the JavaScript property to be removed.JSExceptionprivate static void removeMemberImpl(long peer,
int peer_type,
java.lang.String name)
public java.lang.Object getSlot(int index)
throws JSException
JSObjectRetrieves an indexed member of a JavaScript object. Equivalent to "this[index]" in JavaScript.
getSlot in class JSObjectindex - The index of the array to be accessed.JSExceptionprivate static java.lang.Object getSlotImpl(long peer,
int peer_type,
int index)
public void setSlot(int index,
java.lang.Object value)
throws JSException
JSObjectSets an indexed member of a JavaScript object. Equivalent to "this[index] = value" in JavaScript.
setSlot in class JSObjectindex - The index of the array to be accessed.JSExceptionprivate static void setSlotImpl(long peer,
int peer_type,
int index,
java.lang.Object value,
java.security.AccessControlContext acc)
public java.lang.Object call(java.lang.String methodName,
java.lang.Object... args)
throws JSException
JSObjectCalls a JavaScript method. Equivalent to "this.methodName(args[0], args[1], ...)" in JavaScript.
call in class JSObjectmethodName - The name of the JavaScript method to be invoked.args - the Java objects passed as arguments to the method.JSExceptionprivate static java.lang.Object callImpl(long peer,
int peer_type,
java.lang.String methodName,
java.lang.Object[] args,
java.security.AccessControlContext acc)
public java.lang.String toString()
toString in class java.lang.Objectprivate static java.lang.String toStringImpl(long peer,
int peer_type)
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprivate static JSException fwkMakeException(java.lang.Object value)