本文整理了Java中com.google.gwt.core.client.GWT.isScript()
方法的一些代码示例,展示了GWT.isScript()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GWT.isScript()
方法的具体详情如下:
包路径:com.google.gwt.core.client.GWT
类名称:GWT
方法名:isScript
[英]Determines whether or not the running program is script or bytecode.
[中]确定正在运行的程序是脚本还是字节码。
代码示例来源:origin: com.google.gwt/gwt-servlet
private static void watchdogEntryDepthRun() {
// Note: this must NEVER be called nested in a $entry() call.
// This method is call from a "setTimeout": entryDepth should be set to 0.
if (GWT.isScript() && entryDepth != 0) {
entryDepth = 0;
}
watchdogEntryDepthTimerId = -1; // Timer has run.
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private boolean isSupported() {
return !GWT.isScript();
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Stop prefetching.
*/
public static void stop() {
if (!GWT.isScript()) {
// Nothing to do in development mode
return;
}
AsyncFragmentLoader.BROWSER_LOADER.stopPrefetching();
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public final void put(int key, V value) {
if (GWT.isScript()) {
map.put(key, value);
} else {
javaMap.put(key + "", value);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected final boolean needsNameMap() {
if (GWT.isScript()) {
return jsoNameMap == null;
} else {
return super.needsNameMap();
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public final V unsafeGet(String key) {
if (GWT.isScript()) {
return map.unsafeGet(key);
} else {
return javaMap.get(key);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Start prefetching.
*/
public static void start() {
if (!GWT.isScript()) {
// Nothing to do in development mode
return;
}
AsyncFragmentLoader.BROWSER_LOADER.startPrefetching();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Ask whether this code has already been loaded.
*/
public boolean isLoaded() {
if (!GWT.isScript()) {
return true;
}
return AsyncFragmentLoader.BROWSER_LOADER.isAlreadyLoaded(splitPoint);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Returns the permutation's strong name. This can be used to distinguish
* between different permutations of the same module. In Development Mode,
* this method will return {@value #HOSTED_MODE_PERMUTATION_STRONG_NAME}.
*/
public static String getPermutationStrongName() {
if (GWT.isScript()) {
return Impl.getPermutationStrongName();
} else {
return HOSTED_MODE_PERMUTATION_STRONG_NAME;
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public final V get(int key) {
if (GWT.isScript()) {
return map.unsafeGet(key);
} else {
return javaMap.get(key + "");
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public final void unsafePut(String key, V value) {
if (GWT.isScript()) {
map.unsafePut(key, value);
} else {
javaMap.put(key, value);
}
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public PrivateMap() {
if (GWT.isScript()) {
map = JsMap.create().cast();
} else {
javaMap = new HashMap<String, V>();
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Lookup a currency based on the ISO4217 currency code.
*
* @param currencyCode ISO4217 currency code
* @return currency data, or null if code not found
*/
public final CurrencyData lookup(String currencyCode) {
ensureCurrencyMap();
if (GWT.isScript()) {
return lookupNative(dataMapNative, currencyCode);
} else {
return dataMapJava.get(currencyCode);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Lookup a currency name based on the ISO4217 currency code.
*
* @param currencyCode ISO4217 currency code
* @return name of the currency, or null if code not found
*/
public final String lookupName(String currencyCode) {
ensureNamesMap();
if (GWT.isScript()) {
return lookupNameNative(namesMapNative, currencyCode);
} else {
String result = namesMapJava.get(currencyCode);
return (result == null) ? currencyCode : result;
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected final void loadNameMap() {
if (GWT.isScript()) {
jsoNameMap = loadNameMapNative();
} else {
loadNameMapJava();
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Return the default currency data for this locale.
*
* Generated implementations override this method.
*/
public CurrencyData getDefault() {
if (GWT.isScript()) {
return getDefaultNative();
} else {
return getDefaultJava();
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public final String getRegionNameImpl(String regionCode) {
if (GWT.isScript()) {
return getRegionNameNative(regionCode);
} else {
return super.getRegionNameImpl(regionCode);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Sets the context's fillStyle.
*
* @param fillStyle the fill style to set.
* @see #getFillStyle()
* @see CssColor
*/
public final void setFillStyle(FillStrokeStyle fillStyle) {
if (GWT.isScript()) {
setFillStyleWeb(fillStyle);
} else {
setFillStyleDev(fillStyle);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Ensure that the map of currency data has been initialized.
*/
private void ensureCurrencyMap() {
if (GWT.isScript()) {
if (dataMapNative == null) {
dataMapNative = loadCurrencyMapNative();
}
} else {
if (dataMapJava == null) {
dataMapJava = loadCurrencyMapJava();
}
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Sets the context's stroke style.
*
* @param strokeStyle the stroke style to set
* @see #getStrokeStyle()
* @see CssColor
*/
public final void setStrokeStyle(FillStrokeStyle strokeStyle) {
if (GWT.isScript()) {
setStrokeStyleWeb(strokeStyle);
} else {
setStrokeStyleDev(strokeStyle);
}
}
内容来源于网络,如有侵权,请联系作者删除!