Class ResolvedTypeCache
java.lang.Object
com.fasterxml.classmate.util.ResolvedTypeCache
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ConcurrentTypeCache, LRUTypeCache
Simple LRU cache used for storing up to specified number of most recently accessed
ResolvedType instances.
Since usage pattern is such that caller needs synchronization, cache access methods
are fully synchronized so that caller need not do explicit synchronization.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_addForTest(ResolvedType type) Method only used by test code: do not use otherwise.static ResolvedTypeCacheconcurrentCache(int maxEntries) abstract ResolvedTypefind(ResolvedTypeKey key) Helper method for constructing reusable cache keyskey(Class<?> simpleType, ResolvedType[] tp) Helper method for constructing reusable cache keysstatic ResolvedTypeCachelruCache(int maxEntries) abstract voidput(ResolvedTypeKey key, ResolvedType type) abstract intsize()
-
Constructor Details
-
ResolvedTypeCache
public ResolvedTypeCache()
-
-
Method Details
-
lruCache
- Since:
- 1.4
-
concurrentCache
- Since:
- 1.4
-
key
Helper method for constructing reusable cache keys -
key
Helper method for constructing reusable cache keys -
find
-
size
public abstract int size() -
put
-
_addForTest
Method only used by test code: do not use otherwise.
-