Package com.google.gwt.core.client
Annotation Type UnsafeNativeLong
-
@Target(METHOD) @Retention(SOURCE) public @interface UnsafeNativeLongThis annotation can be placed on a native method to allow it to directly access Javalongvalues. Without this annotation present, accessing alongin any way from a JSNI method is an error. This includes declaring a parameter or return type oflong, calling a method that takes or returns along, or accessing alongfield.The reason for the restriction is that Java long values are not represented as numeric values in compiled code, but as opaque Objects. Attempting to perform math operations on them would produce undesirable results.
Use this annotation with care; the only safe thing to do with
longvalues in JSNI code is to pass them back into Java unaltered.