GH-587 - Additional modulith packages are now considered for application classes.

This commit is contained in:
Oliver Drotbohm
2024-05-20 17:23:15 +02:00
parent a7145c3b86
commit 04c1203f65
11 changed files with 178 additions and 4 deletions

View File

@@ -275,7 +275,6 @@ public class ApplicationModules implements Iterable<ApplicationModule> {
* Returns whether the given {@link JavaClass} is contained within the {@link ApplicationModules}.
*
* @param type must not be {@literal null}.
* @return
*/
public boolean contains(JavaClass type) {
@@ -285,6 +284,18 @@ public class ApplicationModules implements Iterable<ApplicationModule> {
.anyMatch(module -> module.contains(type));
}
/**
* Returns whether the given {@link Class} is contained within the {@link ApplicationModules}.
*
* @param type must not be {@literal null}.
*/
public boolean contains(Class<?> type) {
Assert.notNull(type, "Type must not be null!");
return allClasses.contain(type) && contains(allClasses.get(type));
}
/**
* Returns whether the given type is contained in one of the root packages (not including sub-packages) of the
* modules.