Uses of Class
org.springframework.modulith.core.JavaPackage
Package
Description
Core, internal abstractions of Spring Modulith.
-
Uses of JavaPackage in org.springframework.modulith.core
Modifier and TypeMethodDescriptionApplicationModule.getBasePackage()
Returns the module's base package.ApplicationModuleSource.moduleBasePackage()
Returns the value of themoduleBasePackage
record component.static JavaPackage
Creates a newJavaPackage
for the given classes and name.JavaPackage.toSingle()
Reduces theJavaPackage
to only its base package.Modifier and TypeMethodDescription(package private) Stream<JavaPackage>
JavaPackage.andSubPackagesAnnotatedWith
(Class<? extends Annotation> type) Returns a newStream
of the current package and all its sub-packages annotated with the given annotation type.ApplicationModule.getBootstrapBasePackages
(ApplicationModules modules, DependencyDepth depth) Returns allJavaPackage
for the current module including the ones by its dependencies.JavaPackage.getDirectSubPackages()
Returns all direct sub-packages of the current one.ApplicationModuleDetectionStrategy.getModuleBasePackages
(JavaPackage basePackage) Given theJavaPackage
that Moduliths was initialized with, return the base packages for all modules in the system.(package private) Optional<JavaPackage>
JavaPackage.getSubPackage
(String localName) Returns the sub-package with the given local name.JavaPackage.getSubPackagesAnnotatedWith
(Class<? extends Annotation> annotation) Returns all sub-packages that carry the given annotation type.JavaPackages.iterator()
(package private) static Comparator<JavaPackage>
JavaPackage.reverse()
(package private) Stream<JavaPackage>
JavaPackages.stream()
Returns a stream ofJavaPackage
s.Modifier and TypeMethodDescriptionint
JavaPackage.compareTo
(JavaPackage o) (package private) static NamedInterfaces
NamedInterfaces.discoverNamedInterfaces
(JavaPackage basePackage) Discovers allNamedInterfaces
declared for the givenJavaPackage
.(package private) static NamedInterfaces
NamedInterfaces.forOpen
(JavaPackage basePackage) Creates a newNamedInterface
consisting of the unnamed one containing all classes in the givenJavaPackage
.static ApplicationModuleSource
ApplicationModuleSource.from
(JavaPackage pkg, String name) Creates a newApplicationModuleSource
for the givenJavaPackage
and name.static Stream<ApplicationModuleSource>
ApplicationModuleSource.from
(JavaPackage pkg, ApplicationModuleDetectionStrategy strategy, boolean fullyQualifiedModuleNames) Returns aStream
ofApplicationModuleSource
s by applying the givenApplicationModuleDetectionStrategy
to the given base package.ApplicationModuleDetectionStrategy.getModuleBasePackages
(JavaPackage basePackage) Given theJavaPackage
that Moduliths was initialized with, return the base packages for all modules in the system.JavaPackage.getTrailingName
(JavaPackage pkg) Returns the name of the givenJavaPackage
with regards to the current one.(package private) boolean
JavaPackage.isSubPackageOf
(JavaPackage reference) Returns whether the given reference package is a sub-package of the current one.ApplicationModuleInformation.AnnotationLookup.of
(JavaPackage javaPackage, Predicate<com.tngtech.archunit.core.domain.JavaClass> typeSelector) static ApplicationModuleInformation
ApplicationModuleInformation.of
(JavaPackage javaPackage) Creates a newApplicationModuleInformation
for the givenJavaPackage
.(package private) static List<NamedInterface>
NamedInterface.of
(JavaPackage javaPackage) Returns allNamedInterface
s for the givenJavaPackage
.(package private) static NamedInterfaces
NamedInterfaces.ofAnnotatedPackages
(JavaPackage basePackage) Creates a newNamedInterfaces
for the given baseJavaPackage
.static JavaPackages
JavaPackages.onlySubPackagesOf
(JavaPackage reference, Collection<JavaPackage> packages) Creates a newJavaPackages
containing all sub-packages of the given reference package contained in the given packages.(package private) static NamedInterface
NamedInterface.unnamed
(JavaPackage javaPackage, boolean flatten) Creates an unnamedNamedInterface
for the givenJavaPackage
.Modifier and TypeMethodDescription(package private) Classes
JavaPackage.getClasses
(Iterable<JavaPackage> exclusions) Returns all Classes residing in the current package but not in any of the given sub-packages.static JavaPackages
JavaPackages.onlySubPackagesOf
(JavaPackage reference, Collection<JavaPackage> packages) Creates a newJavaPackages
containing all sub-packages of the given reference package contained in the given packages.ModifierConstructorDescription(package private)
ApplicationModuleSource
(JavaPackage moduleBasePackage, String moduleName) Creates an instance of aApplicationModuleSource
record class.ModifierConstructorDescription(package private)
JavaPackages
(Collection<JavaPackage> packages) Creates a newJavaPackages
instance for the givenJavaPackage
s.