本文整理了Java中com.google.gwt.core.shared.GWT
类的一些代码示例,展示了GWT
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GWT
类的具体详情如下:
包路径:com.google.gwt.core.shared.GWT
类名称:GWT
[英]Supports core functionality that in some cases requires direct support from the compiler and runtime systems such as runtime type information and deferred binding.
[中]支持在某些情况下需要编译器和运行时系统直接支持的核心功能,如运行时类型信息和延迟绑定。
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Create a new PlaceController with a {@link DefaultDelegate}. The
* DefaultDelegate is created via a call to GWT.create(), so an alternative
* default implementation can be provided through <replace-with> rules
* in a {@code .gwt.xml} file.
*
* @param eventBus the {@link EventBus}
*/
public PlaceController(EventBus eventBus) {
this(eventBus, (Delegate) GWT.create(DefaultDelegate.class));
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Logs a message to the development shell logger in Development Mode, or to
* the JavaScript console in Super Dev Mode. Calls are optimized out in Production Mode.
*/
public static void log(String message) {
log(message, null);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private static Impl impl() {
if (impl == null) {
if (GWT.isClient()) {
impl = GWT.create(Impl.class);
} else {
impl = new ImplServer();
}
}
return impl;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Returns <code>true</code> when running inside the normal GWT environment,
* either in Development Mode or Production Mode. Returns <code>false</code>
* if this code is running in a plain JVM. This might happen when running
* shared code on the server, or during the bootstrap sequence of a
* GWTTestCase test.
*/
public static boolean isClient() {
return com.google.gwt.core.shared.GWT.isClient();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Determines whether or not the running program is script or bytecode.
*/
public static boolean isScript() {
return com.google.gwt.core.shared.GWT.isScript();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Returns <code>true</code> when running in production mode. Returns
* <code>false</code> when running either in development mode, or when running
* in a plain JVM.
*/
public static boolean isProdMode() {
return com.google.gwt.core.shared.GWT.isProdMode();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Instantiates a class via deferred binding.
*
* <p>
* The argument to {@link #create(Class)} <i>must</i> be a class literal
* because the Production Mode compiler must be able to statically determine
* the requested type at compile-time. This can be tricky because using a
* {@link Class} variable may appear to work correctly in Development Mode.
* </p>
*
* @param classLiteral a class literal specifying the base class to be
* instantiated
* @return the new instance, which must be cast to the requested class
*/
public static <T> T create(Class<?> classLiteral) {
/*
* In Production Mode, the compiler directly replaces calls to this method
* with a new Object() type expression of the correct rebound type.
*/
return createImpl(classLiteral);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Return the built DOM as an {@link Element}.
*
* @return the {@link Element} that was built
*/
public Element finish() {
if (!GWT.isClient()) {
throw new RuntimeException("asElement() can only be called from GWT client code.");
}
if (asElementCalled) {
throw new IllegalStateException("asElement() can only be called once.");
}
asElementCalled = true;
// End all open tags.
endAllTags();
return doFinishImpl();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public final String getSerializationSignature(Class<?> clazz) {
assert clazz != null : "clazz";
if (GWT.isScript()) {
return signatureMapNative.get(clazz.hashCode());
} else {
return signatureMapJava.get(clazz.getName());
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Returns <code>true</code> when running in production mode. Returns
* <code>false</code> when running either in development mode, or when running
* in a plain JVM.
*/
public static boolean isProdMode() {
return com.google.gwt.core.shared.GWT.isProdMode();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Instantiates a class via deferred binding.
*
* <p>
* The argument to {@link #create(Class)} <i>must</i> be a class literal
* because the Production Mode compiler must be able to statically determine
* the requested type at compile-time. This can be tricky because using a
* {@link Class} variable may appear to work correctly in Development Mode.
* </p>
*
* @param classLiteral a class literal specifying the base class to be
* instantiated
* @return the new instance, which must be cast to the requested class
*/
public static <T> T create(Class<?> classLiteral) {
/*
* In Production Mode, the compiler directly replaces calls to this method
* with a new Object() type expression of the correct rebound type.
*/
return com.google.gwt.core.shared.GWT.<T>createImpl(classLiteral);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Create a new PlaceHistoryHandler with a {@link DefaultHistorian}. The
* DefaultHistorian is created via a call to GWT.create(), so an alternative
* default implementation can be provided through <replace-with> rules
* in a {@code gwt.xml} file.
*
* @param mapper a {@link PlaceHistoryMapper} instance
*/
public PlaceHistoryHandler(PlaceHistoryMapper mapper) {
this(mapper, (Historian) GWT.create(DefaultHistorian.class));
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Logs a message to the development shell logger in Development Mode, or to
* the console in Super Dev Mode. Calls are optimized out in Production Mode.
*/
public static void log(String message, Throwable e) {
com.google.gwt.core.shared.GWT.log(message, e);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Get the instance of the {@link ElementBuilderFactory}.
*
* @return the {@link ElementBuilderFactory}
*/
public static ElementBuilderFactory get() {
if (instance == null) {
if (GWT.isClient()) {
instance = GWT.create(ElementBuilderFactory.class);
} else {
// The DOM implementation will not work on the server.
instance = HtmlBuilderFactory.get();
}
}
return instance;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
GWT.isClient() ? SerializabilityUtil.class.getClassLoader() : Thread.currentThread()
.getContextClassLoader();
代码示例来源:origin: com.google.gwt/gwt-servlet
if (GWT.isScript()) {
uri = URL.encode(uri);
代码示例来源:origin: com.google.web.bindery/requestfactory-server
/**
* Returns <code>true</code> when running in production mode. Returns
* <code>false</code> when running either in development mode, or when running
* in a plain JVM.
*/
public static boolean isProdMode() {
return com.google.gwt.core.shared.GWT.isProdMode();
}
代码示例来源:origin: com.google.web.bindery/requestfactory-server
/**
* Instantiates a class via deferred binding.
*
* <p>
* The argument to {@link #create(Class)} <i>must</i> be a class literal
* because the Production Mode compiler must be able to statically determine
* the requested type at compile-time. This can be tricky because using a
* {@link Class} variable may appear to work correctly in Development Mode.
* </p>
*
* @param classLiteral a class literal specifying the base class to be
* instantiated
* @return the new instance, which must be cast to the requested class
*/
public static <T> T create(Class<?> classLiteral) {
/*
* In Production Mode, the compiler directly replaces calls to this method
* with a new Object() type expression of the correct rebound type.
*/
return createImpl(classLiteral);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Returns the default implementation of the AnimationScheduler API.
*/
public static AnimationScheduler get() {
if (instance == null) {
AnimationSupportDetector supportDetector = GWT.create(AnimationSupportDetector.class);
instance = (supportDetector != null && supportDetector.isNativelySupported())
? new AnimationSchedulerImplStandard() : new AnimationSchedulerImplTimer();
}
return instance;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Logs a message to the development shell logger in Development Mode, or to
* the console in Super Dev Mode. Calls are optimized out in Production Mode.
*/
public static void log(String message) {
com.google.gwt.core.shared.GWT.log(message);
}
内容来源于网络,如有侵权,请联系作者删除!