If I have a tree of packages like so:
com.foo
com.foo.bar
com.foo.bar.baz
and then I add a package-info.java file in com.foo and add an annotation to the com.foo package, will the annotation also be applied to the children packages, com.foo.bar and com.foo.bar.baz (and so on)? Or will I need to make another package-info.java in each of them with the same annotations?
The annotation is not applied to the "children" packages (by my experiment). But it might get implemented in higher versions of Java (see JEP 104)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With