Michał Zegan
2018-10-09 16:27:38 UTC
Hello,
I know that modules/module declarations can be annotated. Contrary to
other elements from packages downwards, java has a way to read module
descriptions before creating modules themselves (in fact it is a
required step). I am wondering, why doesn't ModuleDescriptor
contain/parse module annotations from class file? That way the
module-info.class has to be read twice, once for module descriptor, once
for annotations. In addition, if I would like to load annotations of a
module x before it is instantiated (like introspection), I would have to
still use a library like asm or similar.
I know that modules/module declarations can be annotated. Contrary to
other elements from packages downwards, java has a way to read module
descriptions before creating modules themselves (in fact it is a
required step). I am wondering, why doesn't ModuleDescriptor
contain/parse module annotations from class file? That way the
module-info.class has to be read twice, once for module descriptor, once
for annotations. In addition, if I would like to load annotations of a
module x before it is instantiated (like introspection), I would have to
still use a library like asm or similar.