1 16 package com.google.gwt.core.client; 17 18 23 public final class GWT { 24 28 29 38 public interface UncaughtExceptionHandler { 39 void onUncaughtException(Throwable e); 40 } 41 42 private static UncaughtExceptionHandler sUncaughtExceptionHandler = null; 44 45 59 public static Object create(Class classLiteral) { 60 64 throw new RuntimeException ( 65 "GWT has not been properly initialized; if you are running a unit test, check that your test case extends GWTTestCase"); 66 } 67 68 76 public static String getHostPageBaseURL() { 77 return Impl.getHostPageBaseURL(); 78 } 79 80 87 public static String getModuleBaseURL() { 88 return Impl.getModuleBaseURL(); 89 } 90 91 94 public static String getModuleName() { 95 return Impl.getModuleName(); 96 } 97 98 106 public static native String getTypeName(Object o) ; 109 110 121 public static UncaughtExceptionHandler getUncaughtExceptionHandler() { 122 return sUncaughtExceptionHandler; 123 }; 124 125 128 public static boolean isScript() { 129 return true; 130 } 131 132 136 public static void log(String message, Throwable e) { 137 } 139 140 148 public static void setUncaughtExceptionHandler( 149 UncaughtExceptionHandler handler) { 150 sUncaughtExceptionHandler = handler; 151 }; 152 } 153 | Popular Tags |