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 boolean
hasExternalizedAnnotation
(Object event) Returns whether the given event is annotated with a supportedExternalized
annotation.(package private) static AnnotationTargetLookup
Returns theAnnotationTargetLookup
for the given type.
-
Method Details
-
of
Returns theAnnotationTargetLookup
for the given type.- Parameters:
type
- must not be null.- Returns:
- will never be null.
-
hasExternalizedAnnotation
Returns whether the given event is annotated with a supportedExternalized
annotation.- Parameters:
event
- must not be null.
-
get
- Specified by:
get
in interfaceSupplier<Optional<RoutingTarget.ParsedRoutingTarget>>
-