com.google.gwt.core.client
Class JavaScriptObject

java.lang.Object
  extended bycom.google.gwt.core.client.JavaScriptObject
Direct Known Subclasses:
Element, Event

public class JavaScriptObject
extends Object

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.

SUBCLASSING IS NOT SUPPORTED EXCEPT FOR THE EXISTING SUBCLASSES.


Field Summary
protected  int opaque
          the underlying JavaScript object
 
Fields inherited from class java.lang.Object
typeId, typeName
 
Constructor Summary
protected JavaScriptObject(int opaque)
          Creates a new JavaScriptObject.
 
Method Summary
 boolean equals(Object other)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize
 

Field Detail

opaque

protected final int opaque
the underlying JavaScript object

Constructor Detail

JavaScriptObject

protected JavaScriptObject(int opaque)
Creates a new JavaScriptObject. This constructor is used internally and should never be called by a user.

Parameters:
opaque - the underlying JavaScript object
Method Detail

toString

public String toString()

equals

public boolean equals(Object other)

hashCode

public int hashCode()


This javadoc distribution was not produced by Google. The official documentation is here.