Java 类com.google.gwt.core.client.UnsafeNativeLong 实例源码

项目:xapi    文件:JsSupport.java   
@UnsafeNativeLong
public static native String boxArray(JavaScriptObject o, String joiner)
/*-{
  if (!o) {
    return "";
  }
  if (!joiner) {
    joiner = "  ";
    // If using default joiner, let's eat all double spaces in any input strings.
    // Though the string will lose the ability to have double spacing, it won't have strange breakage.
    // If you need to support double spaces, be sure to supply your own joiner string,
    // if using generated code, a @JsProperty String joiner(); method should suffice.
    for (var i = o.length; i-->0;) {
      if (o[i]&&o[i].replace) {
        o[i] = o[i].replace(/([ ][ ]+)/ , " ");
      }
    }
  }
  if (o.join) {
    return o.join(joiner);
  }
  return o.toString();
}-*/;
项目:gwt-bean-validators    文件:GwtSpecificValidatorCreator.java   
protected void writeUnsafeNativeLongIfNeeded(final SourceWriter sw, final JType jtype) {
  if (JPrimitiveType.LONG.equals(jtype)) {
    // @com.google.gwt.core.client.UnsafeNativeLong
    sw.print("@");
    sw.println(UnsafeNativeLong.class.getCanonicalName());
  }
}
项目:xapi    文件:JsSupport.java   
@UnsafeNativeLong
public static native long getLong(Object object, String key)
/*-{
  var i = object[key]||null;
  if (i) {
    if (typeof i === 'object' && typeof i.l === 'number') {
      return i;
    }
    return @xapi.components.impl.JsSupport::unboxLong(Lcom/google/gwt/core/client/JavaScriptObject;)(i);
  }
  return {l:0, m:0, h:0};
}-*/;
项目:xapi    文件:JsFunctionAccessors.java   
@UnsafeNativeLong
protected static native JavaScriptObject attributeGetLong(String key)
/*-{
  return function() {
    return @xapi.components.impl.JsSupport::unboxLong(Lcom/google/gwt/core/client/JavaScriptObject;)(this.getAttribute(key));
  }
}-*/;
项目:xapi    文件:JsFunctionAccessors.java   
@UnsafeNativeLong
protected static native JavaScriptObject getterLong(String key)
/*-{
  return function() {
    return @xapi.components.impl.JsSupport::unboxLong(Lcom/google/gwt/core/client/JavaScriptObject;)(this[key]);
  }
}-*/;
项目:xapi    文件:JsFunctionAccessors.java   
@UnsafeNativeLong
protected static native JavaScriptObject setterLong(String key) /*-{
  return function(i) {
    this[key] = i == null ? null : @xapi.components.impl.JsSupport::unboxLong(Lcom/google/gwt/core/client/JavaScriptObject;)(i);
    return this;
  }
}-*/;
项目:xapi    文件:JsFunctionAccessors.java   
@UnsafeNativeLong
protected static native JavaScriptObject getterFloat(String key)
/*-{
  return function() {
    return @xapi.components.impl.JsSupport::unboxFloat(Lcom/google/gwt/core/client/JavaScriptObject;)(this[key]);
  }
}-*/;
项目:jsinterop-base    文件:InternalJsUtil.java   
@UnsafeNativeLong
//J2CL_ONLY @JsMethod(name="castToAny")
public static native long asLong(Object obj) /*-{
  return obj;
}-*/;
项目:gwt-syncproxy    文件:LongLibBase.java   
/**
 * Production Mode implementation; the int array is already the right object.
 */
@UnsafeNativeLong
protected static native long asLong(LongEmul value) /*-{
  return value;
}-*/;
项目:xapi    文件:SourceVisitor.java   
@UnsafeNativeLong
protected static native long getLong(JavaScriptObject object, String member)
/*-{
  return object[member];
}-*/;
项目:xapi    文件:JsSupport.java   
@UnsafeNativeLong
public static native void setLong(Object object, String key, long value)
/*-{
  object[key]=value;
}-*/;
项目:xapi    文件:JsFunctionAccessors.java   
@UnsafeNativeLong
protected static native JavaScriptObject attributeSetLong(String key)
/*-{
  return @xapi.components.impl.JsFunctionAccessors::attributeSetter(Ljava/lang/String;Lcom/google/gwt/core/client/JavaScriptObject;)
  (key, @xapi.components.impl.JsSupport::unboxLong(Lcom/google/gwt/core/client/JavaScriptObject;));
}-*/;
项目:gwt-d3    文件:Interpolators.java   
@UnsafeNativeLong
private static final native JavascriptFunctionInterpolator interpolateNumber0(
        double a, double b) /*-{
    return $wnd.d3.interpolateNumber(a, b);
}-*/;
项目:gwt-d3    文件:Interpolators.java   
@UnsafeNativeLong
private static final native JavascriptFunctionInterpolator interpolateRound0(
        double a, double b) /*-{
    return $wnd.d3.interpolateRound(a, b);
}-*/;
项目:gwt-d3    文件:Interpolators.java   
@UnsafeNativeLong
private static final native JavascriptFunctionInterpolator interpolateZoom0(
        Array<Double> a, Array<Double> b) /*-{
    return $wnd.d3.interpolateZoom(a, b);
}-*/;
项目:gwt-d3    文件:Interpolators.java   
@UnsafeNativeLong
private static final native JavascriptFunctionInterpolator interpolateRgb0(
        Color a, Color b) /*-{
    return $wnd.d3.interpolateRgb(a, b);
}-*/;
项目:gwt-d3    文件:Interpolators.java   
/**
 * Actual JSNI implementation; the result is auto-casted to a
 * {@link JavascriptFunctionInterpolator} and can be used by more specific
 * versions of the
 * 
 * @param a
 * @param b
 * @return
 */
@UnsafeNativeLong
private static final native <T> JavascriptFunctionInterpolator interpolate0(
        T a, T b) /*-{
    var result = $wnd.d3.interpolate(a, b);
    return result;
}-*/;