Class AnnotationTargetLookup
java.lang.Object
org.springframework.modulith.events.AnnotationTargetLookup
- All Implemented Interfaces:
Supplier<Optional<RoutingTarget.ParsedRoutingTarget>>
class AnnotationTargetLookup
extends Object
implements Supplier<Optional<RoutingTarget.ParsedRoutingTarget>>
An annotation based target lookup strategy to enable caching of the function lookups that involve classpath checks.
The currently supported annotations are:
- Spring Modulith's
Externalized - jMolecules
Externalized(if present on the classpath)
- Since:
- 1.1
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionget()(package private) static booleanhasExternalizedAnnotation(Object event) Returns whether the given event is annotated with a supportedExternalizedannotation.(package private) static AnnotationTargetLookupReturns theAnnotationTargetLookupfor the given type.
-
Method Details
-
of
Returns theAnnotationTargetLookupfor the given type.- Parameters:
type- must not be null.- Returns:
- will never be null.
-
hasExternalizedAnnotation
Returns whether the given event is annotated with a supportedExternalizedannotation.- Parameters:
event- must not be null.
-
get
- Specified by:
getin interfaceSupplier<Optional<RoutingTarget.ParsedRoutingTarget>>
-