Package com.fasterxml.classmate.util
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 ResolvedTypeCache
concurrentCache
(int maxEntries) abstract ResolvedType
find
(ResolvedTypeKey key) Helper method for constructing reusable cache keyskey
(Class<?> simpleType, ResolvedType[] tp) Helper method for constructing reusable cache keysstatic ResolvedTypeCache
lruCache
(int maxEntries) abstract void
put
(ResolvedTypeKey key, ResolvedType type) abstract int
size()
-
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.
-