Top Description Constructors Methods
com.fasterxml.classmate.util

public abstract Class ResolvedTypeCache

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
com.fasterxml.classmate.util.ConcurrentTypeCache, com.fasterxml.classmate.util.LRUTypeCache
Annotations
@SuppressWarnings:serial
Imports
java.io.Serializable, java.util.List, com.fasterxml.classmate.ResolvedType, com.fasterxml.classmate.types.TypePlaceHolder

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.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
_addForTest(ResolvedType type)

Method only used by test code: do not use otherwise.

public static ResolvedTypeCache
concurrentCache(int maxEntries)

public abstract ResolvedType
public ResolvedTypeKey
key(Class<?> simpleType)

Helper method for constructing reusable cache keys

public ResolvedTypeKey
key(Class<?> simpleType, ResolvedType[] tp)

Helper method for constructing reusable cache keys

public static ResolvedTypeCache
lruCache(int maxEntries)

public abstract void
public abstract int
size()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ResolvedTypeCacheback to summary
public ResolvedTypeCache()

Method Detail

_addForTestback to summary
protected void _addForTest(ResolvedType type)

Method only used by test code: do not use otherwise.

concurrentCacheback to summary
public static ResolvedTypeCache concurrentCache(int maxEntries)
Since
1.4
findback to summary
public abstract ResolvedType find(ResolvedTypeKey key)
keyback to summary
public ResolvedTypeKey key(Class<?> simpleType)

Helper method for constructing reusable cache keys

keyback to summary
public ResolvedTypeKey key(Class<?> simpleType, ResolvedType[] tp)

Helper method for constructing reusable cache keys

lruCacheback to summary
public static ResolvedTypeCache lruCache(int maxEntries)
Since
1.4
putback to summary
public abstract void put(ResolvedTypeKey key, ResolvedType type)
sizeback to summary
public abstract int size()