public final class

Impl

extends Object
java.lang.Object
   ↳ com.google.gwt.core.client.impl.Impl

Class Overview

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

Summary

Public Constructors
Impl()
Public Methods
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(Object o)
Gets an identity-based hash code on the passed-in Object by adding an expando.
static String getHostPageBaseURL()
static String getModuleBaseURL()
static String getModuleName()
static String getNameOf(String jsniIdent)
Returns the obfuscated name of members in the compiled output.
static 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().
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Impl ()

Public Methods

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 Development 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

public static int getHashCode (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.

public static String getHostPageBaseURL ()

public static String getModuleBaseURL ()

public static String getModuleName ()

public static String getNameOf (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 Development 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

public static String getPermutationStrongName ()

public static boolean isEntryOnStack ()

Indicates if $entry has been called.

public static boolean isNestedEntry ()

Indicates if $entry is present on the stack more than once.

public static JavaScriptObject registerEntry ()

Implicitly called by JavaToJavaScriptCompiler.findEntryPoints().