Package dev.orne.beans
Interface BeanAnnotationFinder.Cache
- All Known Implementing Classes:
BeanAnnotationFinder.WeakHashMapCache
- Enclosing class:
- BeanAnnotationFinder<T extends Annotation,
L extends Annotation>
@API(status=INTERNAL,
since="0.1")
protected static interface BeanAnnotationFinder.Cache
Interface for type level annotations cache.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(@NotNull BeanAnnotationFinder.CacheEntryKey<?> key) Returnstrueif this instance contains an entry for the specified key.<T extends Annotation>
Set<T>get(@NotNull BeanAnnotationFinder.CacheEntryKey<T> key) Returns the cached found annotations for the specified key, if any.<T extends Annotation>
voidput(@NotNull BeanAnnotationFinder.CacheEntryKey<T> key, @NotNull Set<T> value) Puts the specified found annotations for the specified key.
-
Method Details
-
contains
Returnstrueif this instance contains an entry for the specified key.- Parameters:
key- The cache entry key- Returns:
- If this instance contains an entry for the key
-
get
Returns the cached found annotations for the specified key, if any.- Type Parameters:
T- The type of annotations- Parameters:
key- The cache entry key- Returns:
- The annotations found, or
nullif not cached o cache expired
-
put
<T extends Annotation> void put(@NotNull @NotNull BeanAnnotationFinder.CacheEntryKey<T> key, @NotNull @NotNull Set<T> value) Puts the specified found annotations for the specified key.- Type Parameters:
T- The type of annotations- Parameters:
key- The cache entry keyvalue- The annotations found
-