You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When your project uses a module-info.java class, using @IndexSubclasses on the package-info.java class does not work out of the box. According to the javadoc:
Additionally, and except for the special case where the resource has a name ending with ".class", this method will only find resources in packages of named modules when the package is opened unconditionally (even if the caller of this method is in the same module as the resource).
This means that the user needs to add opens package.containing.package.info to the module-info.java in order for the ClassIndex.getPackageClasses function to work. I ran into this problem myself, so I thought it would be useful to document for others.
The text was updated successfully, but these errors were encountered:
When your project uses a
module-info.java
class, using@IndexSubclasses
on thepackage-info.java
class does not work out of the box. According to the javadoc:This means that the user needs to add
opens package.containing.package.info
to themodule-info.java
in order for theClassIndex.getPackageClasses
function to work. I ran into this problem myself, so I thought it would be useful to document for others.The text was updated successfully, but these errors were encountered: