GH-610 - 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 f1ae4af0fb
commit 2c1b2aa371
11 changed files with 187 additions and 5 deletions

View File

@@ -261,7 +261,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) {
@@ -271,6 +270,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.