Damn it, Safari crashed. So now a shorter version of my answer:

First I agree that the current design has become quite confusing. 
Personally I really dislike the single @Js annotation approach because:
- can be applied everywhere so you throw away some compile time checks 
provided by Java's @Target annotation
- exports vs. export is a bit misleading. One must be used with 
interfaces/classes the other with methods. That issue only exists because 
@Js alone has no real meaning.
- You have to type more because it is always annotation name + property + 
value if you can't stick with the default "@Js".
- Can't see a good use case for splitting exports in ALL, INSTANCE_MEMBERS 
and STATIC_MEMBERS. When I want to export a class I want to export its 
public API.


Personally what describes JsInterop best is the alternative using the 
import/export concepts. So I would stick with:

Import/Export types:

@JsImport: can only be applied on interfaces.
@JsExport: always exports all public API in a given scope (package, class, 
method). So no ALL, INSTANCE_MEMBER, STATIC_MEMBER distinction. @JsIgnore 
can be used to opt-out selectively.

Configure import/export:

@JsNamespace: import/export from/to namespace
@JsName: workaround reserved keywords
@JsProperty: mark method as JS property
@JsIgnore: opt-out of export. Might even be useful for import, e.g. do not 
generate trampoline for annotated default method.

Special constructs:

@JsLiteral
@JsFunction (currently it seems not to be a real function which breaks 
interop 
<https://groups.google.com/d/msg/google-web-toolkit/PHtfLTSAJDM/oJjAo3qWa7sJ>
)


I guess that is the cleanest you can get. Not sure what @JsOpaque is good 
for?!

-- J.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/778b8f0b-8cc1-4a90-84d5-39c1b9c02afb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to