|
GWT 2.3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.core.client.JavaScriptObject
public class JavaScriptObject
An opaque handle to a native JavaScript object. A
JavaScriptObject cannot be created directly.
JavaScriptObject should be declared as the return type of a
JSNI method that returns native (non-Java) objects. A
JavaScriptObject passed back into JSNI from Java becomes the
original object, and can be accessed in JavaScript as expected.
| Constructor Summary | |
|---|---|
protected |
JavaScriptObject()
Not directly instantiable. |
| Method Summary | ||
|---|---|---|
|
cast()
A helper method to enable cross-casting from any JavaScriptObject
type to any other JavaScriptObject type. |
|
static JavaScriptObject |
createArray()
Returns a new array. |
|
static JavaScriptObject |
createFunction()
Returns an empty function. |
|
static JavaScriptObject |
createObject()
Returns a new object. |
|
boolean |
equals(java.lang.Object other)
Returns true if the objects are JavaScript identical
(triple-equals). |
|
int |
hashCode()
Uses a monotonically increasing counter to assign a hash code to the underlying JavaScript object. |
|
java.lang.String |
toSource()
Call the toSource() on the JSO. |
|
java.lang.String |
toString()
Makes a best-effort attempt to get a useful debugging string describing the given JavaScriptObject. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected JavaScriptObject()
| Method Detail |
|---|
public static JavaScriptObject createArray()
public static JavaScriptObject createFunction()
public static JavaScriptObject createObject()
public final <T extends JavaScriptObject> T cast()
JavaScriptObject
type to any other JavaScriptObject type.
T - the target type
public final boolean equals(java.lang.Object other)
true if the objects are JavaScript identical
(triple-equals).
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toSource()
public final java.lang.String toString()
toString in class java.lang.Object
|
GWT 2.3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||