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 JavaPackages 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 newApplicationModuleSourceFactorydetecting theApplicationModuleIdentifierbased on a particular annotation's attribute.Returns an optionalApplicationModuleIdentifierobtained by the annotation on the given package.Return aStreamofJavaPackages that are
-
Method Details
-
lookupIdentifier
Returns an optionalApplicationModuleIdentifierobtained by the annotation on the given package.- Parameters:
pkg- must not be null.- Returns:
- will never be null.
-
withNestedPackages
Return aStreamofJavaPackages 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 newApplicationModuleSourceFactorydetecting theApplicationModuleIdentifierbased on a particular annotation's attribute. It also detects nestedJavaPackages 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.
-