Package com.google.gwt.core.shared
Annotation Type GwtIncompatible
@Retention(CLASS)
@Target({TYPE,METHOD,CONSTRUCTOR,FIELD})
@Documented
public @interface GwtIncompatible
A simple of a GwtIncompatible annotation.
Any class, method or field with an annotation @GwtIncompatible (with any package prefix) is
ignored by the GWT compiler.
Since only the name of the annotation matters, Java libraries may use their own copy of this
annotation class to avoid adding a compile-time dependency on GWT.
For example:
class A {
int field;
@GwtIncompatible("incompatible class")
class Inner {
....
}
@GwtIncompatible("incompatible field")
int field2 = methodThatisNotSupportedbyGwt();
void method1() { }
@GwtIncompatible("incompatbile method")
void method2() {}
}
is seen by the Gwt compiler as
class A {
int field;
void method1() { }
}
Warning: this may have surprising effects when combined with method overloading or inheritance.-
Optional Element Summary
-
Element Details
-
value
String valueAn attribute that can be used to explain why the code is incompatible. A GwtIncompatible annotation can have any number of attributes; attributes are for documentation purposes and are ignored by the GWT compiler.- Default:
""
-