google / jsinterop-generator

Generates Java annotated with JsInterop from JavaScript extern sources
Apache License 2.0
75 stars 24 forks source link

Add @Generated annotation to all classes #26

Open realityforge opened 5 years ago

realityforge commented 5 years ago

It would be nice to annotate every generated class with @Generated annotation. This allows some IDEs to exclude these classes form certain code analysis. However, the jre standard @Generated was not introduced until java9 and Elemental2 is still supporting java8. In which case we could delay this change until java9 is the minimum supported version.

Alternatively, we could use the "enterprise java" @javax.annotations.Generated annotation but this would add a dependency solely for this annotation which seems sub-optimal. If we implement #25 and include @javax.annotations.Nonnull then the @javax.annotations.Generated annotation will be present in which case it would make sense to adopt this annotation for now.