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. }
private boolean isSupported() { return !GWT.isScript(); } }
/** * Stop prefetching. */ public static void stop() { if (!GWT.isScript()) { // Nothing to do in development mode return; } AsyncFragmentLoader.BROWSER_LOADER.stopPrefetching(); } }
public final void put(int key, V value) { if (GWT.isScript()) { map.put(key, value); } else { javaMap.put(key + "", value); } }
@Override protected final boolean needsNameMap() { if (GWT.isScript()) { return jsoNameMap == null; } else { return super.needsNameMap(); } }
public final V unsafeGet(String key) { if (GWT.isScript()) { return map.unsafeGet(key); } else { return javaMap.get(key); } }
/** * Start prefetching. */ public static void start() { if (!GWT.isScript()) { // Nothing to do in development mode return; } AsyncFragmentLoader.BROWSER_LOADER.startPrefetching(); }
/** * Ask whether this code has already been loaded. */ public boolean isLoaded() { if (!GWT.isScript()) { return true; } return AsyncFragmentLoader.BROWSER_LOADER.isAlreadyLoaded(splitPoint); } }
/** * 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; } }
public final V get(int key) { if (GWT.isScript()) { return map.unsafeGet(key); } else { return javaMap.get(key + ""); } }
public final void unsafePut(String key, V value) { if (GWT.isScript()) { map.unsafePut(key, value); } else { javaMap.put(key, value); } } }
public PrivateMap() { if (GWT.isScript()) { map = JsMap.create().cast(); } else { javaMap = new HashMap<String, V>(); } }
/** * 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); } }
/** * 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; } }
@Override protected final void loadNameMap() { if (GWT.isScript()) { jsoNameMap = loadNameMapNative(); } else { loadNameMapJava(); } }
/** * Return the default currency data for this locale. * * Generated implementations override this method. */ public CurrencyData getDefault() { if (GWT.isScript()) { return getDefaultNative(); } else { return getDefaultJava(); } }
@Override public final String getRegionNameImpl(String regionCode) { if (GWT.isScript()) { return getRegionNameNative(regionCode); } else { return super.getRegionNameImpl(regionCode); } }
/** * 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); } }
/** * 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(); } } }
/** * 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); } }