public final class Impl extends Object
Constructor and Description |
---|
Impl() |
Modifier and Type | Method and Description |
---|---|
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 String |
getHostPageBaseURL() |
static String |
getModuleBaseURL() |
static String |
getModuleBaseURLForStaticFiles() |
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 void |
maybeInitializeWindowOnError() |
static JavaScriptObject |
registerEntry()
Implicitly called by JavaToJavaScriptCompiler.findEntryPoints().
|
static void |
registerWindowOnError(boolean reportAlways) |
static void |
reportUncaughtException(Throwable e) |
static void |
setUncaughtExceptionHandlerForTest(GWT.UncaughtExceptionHandler handler)
Set an uncaught exception handler to spy on uncaught exceptions in unit
tests.
|
public static JavaScriptObject entry(JavaScriptObject jsFunction)
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
.
jsFunction
- a JS function to invoke, which is typically a JSNI
reference to a static Java methodjsFunction
is invoked, or
undefined
if the UncaughtExceptionHandler catches an
exception raised by jsFunction
public static String getHostPageBaseURL()
public static String getModuleBaseURL()
public static String getModuleBaseURLForStaticFiles()
public static String getModuleName()
public static String getNameOf(String jsniIdent)
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.null
if the requested member has been pruned from the
output.public static String getPermutationStrongName()
public static void setUncaughtExceptionHandlerForTest(GWT.UncaughtExceptionHandler handler)
Setting this method will not interfere with any exception handling logic;
i.e. GWT.getUncaughtExceptionHandler()
will still return null if a
handler is not set via GWT.setUncaughtExceptionHandler(com.google.gwt.core.client.GWT.UncaughtExceptionHandler)
.
public static void maybeInitializeWindowOnError()
@GwtScriptOnly public static void registerWindowOnError(boolean reportAlways)
public static void reportUncaughtException(Throwable e)
public static boolean isEntryOnStack()
$entry
has been called.public static boolean isNestedEntry()
$entry
is present on the stack more than once.public static JavaScriptObject registerEntry()
Copyright © 2018. All rights reserved.