com.google.gwt.core.client.impl
Class Impl

java.lang.Object
  extended by com.google.gwt.core.client.impl.Impl

public final class Impl
extends java.lang.Object

Private implementation class for GWT core. This API is should not be considered public or stable.


Constructor Summary
Impl()
           
 
Method Summary
static JavaScriptObject entry(JavaScriptObject jsFunction)
          This method should be used whenever GWT code is entered from a JS context and there is no GWT code in the same module on the call stack.
static int getHashCode(java.lang.Object o)
          Gets an identity-based hash code on the passed-in Object by adding an expando.
static java.lang.String getHostPageBaseURL()
           
static java.lang.String getModuleBaseURL()
           
static java.lang.String getModuleName()
           
static java.lang.String getNameOf(java.lang.String jsniIdent)
          Returns the obfuscated name of members in the compiled output.
static java.lang.String getPermutationStrongName()
           
static boolean isEntryOnStack()
          Indicates if $entry has been called.
static boolean isNestedEntry()
          Indicates if $entry is present on the stack more than once.
static JavaScriptObject registerEntry()
          Implicitly called by JavaToJavaScriptCompiler.findEntryPoints().
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Impl

public Impl()
Method Detail

entry

public static JavaScriptObject entry(JavaScriptObject jsFunction)
This method should be used whenever GWT code is entered from a JS context and there is no GWT code in the same module on the call stack. Examples include event handlers, exported methods, and module initialization.

The GWT compiler and hosted mode will provide a module-scoped variable, $entry, which is an alias for this method.

This method can be called reentrantly, which will simply delegate to the function.

The function passed to this method will be invoked via Function.apply() with the current this value and the invocation arguments passed to $entry.

Parameters:
jsFunction - a JS function to invoke, which is typically a JSNI reference to a static Java method
Returns:
the value returned when jsFunction is invoked, or undefined if the UncaughtExceptionHandler catches an exception raised by jsFunction

getHashCode

public static int getHashCode(java.lang.Object o)
Gets an identity-based hash code on the passed-in Object by adding an expando. This method should not be used with null or any String. The former will crash and the later will produce unstable results when called repeatedly with a String primitive.

The sequence of hashcodes generated by this method are a monotonically-increasing sequence.


getHostPageBaseURL

public static java.lang.String getHostPageBaseURL()

getModuleBaseURL

public static java.lang.String getModuleBaseURL()

getModuleName

public static java.lang.String getModuleName()

getNameOf

public static java.lang.String getNameOf(java.lang.String jsniIdent)
Returns the obfuscated name of members in the compiled output. This is a thin wrapper around JNameOf AST nodes and is therefore meaningless to implement in hosted mode.

Parameters:
jsniIdent - a string literal specifying a type, field, or method. Raw type names may also be used to obtain the name of the type's seed function.
Returns:
the name by which the named member can be accessed at runtime, or null if the requested member has been pruned from the output.
See Also:
com.google.gwt.core.client.impl.ArtificialRescue

getPermutationStrongName

public static java.lang.String getPermutationStrongName()

isEntryOnStack

public static boolean isEntryOnStack()
Indicates if $entry has been called.


isNestedEntry

public static boolean isNestedEntry()
Indicates if $entry is present on the stack more than once.


registerEntry

public static JavaScriptObject registerEntry()
Implicitly called by JavaToJavaScriptCompiler.findEntryPoints().