Open virtual-machinist opened 3 years ago
As a side note - any reason com.sun.codemodel.JModule
does not implement com.sun.codemodel.JGenerable
while having a similar generate
method (returns the passed JFormatter
instead of void
required by the interface, although value not used anywhere in this library)?
In addition to code alignment with other code model classes this allows for some code reuse. I for example use JGenerable
in custom assertions for tests of my XJC plugins.
Right now module-info file generation supports only adding
requires
andexports
directives.Since
java.lang.Module
implementsjava.lang.reflect.AnnotatedElement
and thus can in theory be annotated, so shouldcom.sun.codemodel.JModule
implementcom.sun.codemodel.JAnnotatable
.Besides that module-info files can contain JavaDoc, so they should probably implement
com.sun.codemodel.JDocCommentable
.