Interface ApplicationModuleSource.ApplicationModuleSourceMetadata
- Enclosing class:
- ApplicationModuleSource
static interface ApplicationModuleSource.ApplicationModuleSourceMetadata
An intermediate abstraction to detect both the
ApplicationModuleIdentifier
and potentially nested module
declarations for the JavaPackage
s returned from the first pass of module detection.- Author:
- Oliver Drotbohm
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Annotation>
ApplicationModuleSource.ApplicationModuleSourceMetadataforAnnotation
(Class<T> annotation, Function<T, String> extractor) Creates a newApplicationModuleSourceFactory
detecting theApplicationModuleIdentifier
based on a particular annotation's attribute.Returns an optionalApplicationModuleIdentifier
obtained by the annotation on the given package.Return aStream
ofJavaPackage
s that are
-
Method Details
-
lookupIdentifier
Returns an optionalApplicationModuleIdentifier
obtained by the annotation on the given package.- Parameters:
pkg
- must not be null.- Returns:
- will never be null.
-
withNestedPackages
Return aStream
ofJavaPackage
s that are- Parameters:
pkg
- must not be null.- Returns:
- will never be null.
-
forAnnotation
static <T extends Annotation> ApplicationModuleSource.ApplicationModuleSourceMetadata forAnnotation(Class<T> annotation, Function<T, String> extractor) Creates a newApplicationModuleSourceFactory
detecting theApplicationModuleIdentifier
based on a particular annotation's attribute. It also detects nestedJavaPackage
s annotated with the given annotation as nested module base packages.- Type Parameters:
T
- an annotation type- Parameters:
annotation
- must not be null.extractor
- must not be null.- Returns:
- will never be null.
-