public static class TypePool.CacheProvider.Simple extends Object implements TypePool.CacheProvider
ConcurrentHashMap
.TypePool.CacheProvider.NoOp, TypePool.CacheProvider.Simple
UNRESOLVED
Constructor and Description |
---|
Simple()
Creates a new simple cache.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears this cache.
|
TypePool.Resolution |
find(String name)
Attempts to find a resolution in this cache.
|
TypePool.Resolution |
register(String name,
TypePool.Resolution resolution)
Registers a resolution in this cache.
|
String |
toString() |
public TypePool.Resolution find(String name)
TypePool.CacheProvider
find
in interface TypePool.CacheProvider
name
- The name of the type to describe.null
if no such resolution can be found in the cache..public TypePool.Resolution register(String name, TypePool.Resolution resolution)
TypePool.CacheProvider
register
in interface TypePool.CacheProvider
name
- The name of the type that is to be registered.resolution
- The resolution to register.public void clear()
TypePool.CacheProvider
clear
in interface TypePool.CacheProvider
Copyright © 2014–2015. All rights reserved.