本文整理了Java中com.google.gwt.core.client.GWT.isProdMode()
方法的一些代码示例,展示了GWT.isProdMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GWT.isProdMode()
方法的具体详情如下:
包路径:com.google.gwt.core.client.GWT
类名称:GWT
方法名:isProdMode
[英]Returns true
when running in production mode. Returns false
when running either in development mode, or when running in a plain JVM.
[中]在生产模式下运行时返回true
。在开发模式下运行或在普通JVM中运行时返回false
。
代码示例来源:origin: libgdx/libgdx
public Float32Array copy (FloatBuffer buffer) {
if (GWT.isProdMode()) {
return ((Float32Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
} else {
ensureCapacity(buffer);
for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {
floatBuffer.set(j, buffer.get(i));
}
return floatBuffer.subarray(0, buffer.remaining());
}
}
代码示例来源:origin: libgdx/libgdx
public Float32Array copy (FloatBuffer buffer) {
if (GWT.isProdMode()) {
return ((Float32Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
} else {
ensureCapacity(buffer);
for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {
floatBuffer.set(j, buffer.get(i));
}
return floatBuffer.subarray(0, buffer.remaining());
}
}
代码示例来源:origin: libgdx/libgdx
public Int32Array copy (IntBuffer buffer) {
if (GWT.isProdMode()) {
return ((Int32Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
} else {
ensureCapacity(buffer);
for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {
intBuffer.set(j, buffer.get(i));
}
return intBuffer.subarray(0, buffer.remaining());
}
}
代码示例来源:origin: libgdx/libgdx
public Int32Array copy (IntBuffer buffer) {
if (GWT.isProdMode()) {
return ((Int32Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
} else {
ensureCapacity(buffer);
for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {
intBuffer.set(j, buffer.get(i));
}
return intBuffer.subarray(0, buffer.remaining());
}
}
代码示例来源:origin: libgdx/libgdx
public Int16Array copy (ShortBuffer buffer) {
if (GWT.isProdMode()) {
return ((Int16Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
} else {
ensureCapacity(buffer);
for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {
shortBuffer.set(j, buffer.get(i));
}
return shortBuffer.subarray(0, buffer.remaining());
}
}
代码示例来源:origin: libgdx/libgdx
public Int16Array copy (ShortBuffer buffer) {
if (GWT.isProdMode()) {
return ((Int16Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
} else {
ensureCapacity(buffer);
for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {
shortBuffer.set(j, buffer.get(i));
}
return shortBuffer.subarray(0, buffer.remaining());
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public String toString() {
if (GWT.isProdMode()) {
return super.toString();
} else {
return editor == null ? "Uninitialized" : EditorHierarchyPrinter.toString(asEditorDriver());
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Checks that the parent of {@code rendered} has a single child.
*/
private static boolean isRenderedElementSingleChild(Element rendered) {
return GWT.isProdMode() || rendered.getParentElement().getChildCount() == 1;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
throw new RuntimeException("UiRendered element is not attached to DOM while getting \""
+ fieldName + "\"");
} else if (!GWT.isProdMode()) {
throw new IllegalStateException("\"" + fieldName
+ "\" not found within rendered element");
代码示例来源:origin: com.google.gwt/gwt-servlet
if (GWT.isProdMode()) {
return;
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* In DevMode, walks up the parents of the {@code rendered} element to ascertain that it is
* attached to the document. Always returns <code>true</code> in ProdMode.
*/
private static boolean isAttachedToDom(Element rendered) {
if (GWT.isProdMode()) {
return true;
}
Element body = Document.get().getBody();
while (rendered != null && rendered.hasParentElement() && !body.equals(rendered)) {
rendered = rendered.getParentElement();
}
return body.equals(rendered);
}
代码示例来源:origin: com.allen-sauer.gwt.log/gwt-log
@Override
public void onSuccess(ArrayList<LogRecord> deobfuscatedLogRecords) {
if (GWT.isProdMode() && deobfuscatedLogRecords != null) {
for (LogRecord record : deobfuscatedLogRecords) {
if (record.getThrowable() != null) {
RemoteLoggerImpl.super.loggersLog(record);
}
}
}
callInProgressOrScheduled = false;
maybeTriggerRPC();
}
代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui
private static boolean isGwtHostedModeParameterOnly() {
Map<String, List<String>> parameters = Window.Location.getParameterMap();
boolean hasGwtCodesrvParameter = parameters.containsKey("gwt.codesvr");
return !GWT.isProdMode() && parameters.size() == 1 && hasGwtCodesrvParameter;
}
代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui
@Override
public void onNewFullOfferings(PropagateOfferingsFullEvent evt) {
if ( !GWT.isProdMode()) {
TimeseriesParametersLookup lookup = controller.getParametersLookup();
Collection<Offering> offerings = lookup.getOfferings();
int offeringsSize = offerings.size();
GWT.log("#" + offeringsSize + " new Offerings");
}
}
代码示例来源:origin: dankurka/gwtphonegap
public static <V> LightArray<V> constructArray() {
if (GWT.isProdMode()) {
return new JsLightArray<V>();
} else {
return new JavaLightArray<V>();
}
}
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Checks that the parent of {@code rendered} has a single child.
*/
private static boolean isRenderedElementSingleChild(Element rendered) {
return GWT.isProdMode() || rendered.getParentElement().getChildCount() == 1;
}
代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui
@Override
public void onNewStationPositions(NewStationPositionsEvent evt) {
if ( !GWT.isProdMode()) {
TimeseriesParametersLookup lookup = controller.getParametersLookup();
ArrayList<Procedure> procedures = lookup.getProcedures();
int proceduresSize = procedures.size();
GWT.log("#" + proceduresSize + " new Procedures");
}
controller.updateMapContent();
controller.zoomToConfiguredExtent();
controller.updateStationFilter();
}
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-gwt
public Int32Array copy (IntBuffer buffer) {
if (GWT.isProdMode()) {
return ((Int32Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
} else {
ensureCapacity(buffer);
for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {
intBuffer.set(j, buffer.get(i));
}
return intBuffer.subarray(0, buffer.remaining());
}
}
代码示例来源:origin: thothbot/parallax
public Int32Array copy (IntBuffer buffer) {
if(buffer == null) return Int32ArrayNative.create(0);
if (GWT.isProdMode()) {
return ((Int32Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
} else {
ensureCapacity(buffer);
for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {
intBuffer.set(j, buffer.get(i));
}
return intBuffer.subarray(0, buffer.remaining());
}
}
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-gwt
public Int16Array copy (ShortBuffer buffer) {
if (GWT.isProdMode()) {
return ((Int16Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());
} else {
ensureCapacity(buffer);
for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {
shortBuffer.set(j, buffer.get(i));
}
return shortBuffer.subarray(0, buffer.remaining());
}
}
内容来源于网络,如有侵权,请联系作者删除!