| java.lang.Object com.google.gwt.core.client.GWT
GWT | final public class GWT (Code) | | Supports core functionality that in some cases requires direct support from
the compiler and runtime systems such as runtime type information and
deferred binding.
|
Inner Class :public interface UncaughtExceptionHandler | |
Method Summary | |
public static T | create(Class> classLiteral) Instantiates a class via deferred binding.
The argument to
GWT.create(Class) must be a class
literal because the web mode compiler must be able to statically determine
the requested type at compile-time. | public static String | getHostPageBaseURL() Gets the URL prefix of the hosting page, useful for prepending to relative
paths of resources which may be relative to the host page. | public static String | getModuleBaseURL() Gets the URL prefix of the module which should be prepended to URLs that
are intended to be module-relative, such as RPC entry points and files in
the module's public path. | public static String | getModuleName() Gets the name of the running module. | public static String | getTypeName(Object o) | public static UncaughtExceptionHandler | getUncaughtExceptionHandler() Returns the currently active uncaughtExceptionHandler. | public static boolean | isScript() Determines whether or not the running program is script or bytecode. | public static void | log(String message, Throwable e) Logs a message to the development shell logger in hosted mode. | public static void | setUncaughtExceptionHandler(UncaughtExceptionHandler handler) Sets a custom uncaught exception handler. |
create | public static T create(Class> classLiteral)(Code) | | Instantiates a class via deferred binding.
The argument to
GWT.create(Class) must be a class
literal because the web mode compiler must be able to statically determine
the requested type at compile-time. This can be tricky because using a
Class variable may appear to work correctly in hosted mode.
Parameters: classLiteral - a class literal specifying the base class to beinstantiated the new instance, which must be typecast to the requested class. |
getHostPageBaseURL | public static String getHostPageBaseURL()(Code) | | Gets the URL prefix of the hosting page, useful for prepending to relative
paths of resources which may be relative to the host page. Typically, you
should use
GWT.getModuleBaseURL() unless you have a specific reason to
load a resource relative to the host page.
if non-empty, the base URL is guaranteed to end with a slash |
getModuleBaseURL | public static String getModuleBaseURL()(Code) | | Gets the URL prefix of the module which should be prepended to URLs that
are intended to be module-relative, such as RPC entry points and files in
the module's public path.
if non-empty, the base URL is guaranteed to end with a slash |
getModuleName | public static String getModuleName()(Code) | | Gets the name of the running module.
|
getUncaughtExceptionHandler | public static UncaughtExceptionHandler getUncaughtExceptionHandler()(Code) | | Returns the currently active uncaughtExceptionHandler. "Top level" methods
that dispatch events from the browser into user code must call this method
on entry to get the active handler. If the active handler is null, the
entry point must allow exceptions to escape into the browser. If the
handler is non-null, exceptions must be caught and routed to the handler.
See the source code for DOM.dispatchEvent() for an example
of how to handle this correctly.
the currently active handler, or null if no handler is active. |
isScript | public static boolean isScript()(Code) | | Determines whether or not the running program is script or bytecode.
|
log | public static void log(String message, Throwable e)(Code) | | Logs a message to the development shell logger in hosted mode. Calls are
optimized out in web mode.
|
setUncaughtExceptionHandler | public static void setUncaughtExceptionHandler(UncaughtExceptionHandler handler)(Code) | | Sets a custom uncaught exception handler. See
GWT.getUncaughtExceptionHandler() for details.
Parameters: handler - the handler that should be called when an exception is aboutto escape to the browser, or null to clear thehandler and allow exceptions to escape. |
|
|