From 10f8716481cc461bb78b849edb5b879f0fac374a Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Thu, 17 Apr 2025 23:45:32 +0200 Subject: [PATCH] GH-1150 - ApplicationModule now exposes internal types. --- .../modulith/core/ApplicationModule.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spring-modulith-core/src/main/java/org/springframework/modulith/core/ApplicationModule.java b/spring-modulith-core/src/main/java/org/springframework/modulith/core/ApplicationModule.java index 8e495e6d..678473f7 100644 --- a/spring-modulith-core/src/main/java/org/springframework/modulith/core/ApplicationModule.java +++ b/spring-modulith-core/src/main/java/org/springframework/modulith/core/ApplicationModule.java @@ -781,6 +781,19 @@ public class ApplicationModule implements Comparable { return classes; } + /** + * Returns all types internal to the module. + * + * @return will never be {@literal null}. + * @since 1.4 + */ + public Collection getInternalTypes() { + + return classes.stream() + .filter(Predicate.not(this::isExposed)) + .toList(); + } + private String getQualifiedName(NamedInterface namedInterface) { return namedInterface.getQualifiedName(getIdentifier()); }