Package org.apache.commons.ognl.internal
Class ClassCacheImpl<V>
- java.lang.Object
-
- org.apache.commons.ognl.internal.ClassCacheImpl<V>
-
- All Implemented Interfaces:
Cache<java.lang.Class<?>,V>,ClassCache<V>
public class ClassCacheImpl<V> extends java.lang.Object implements ClassCache<V>
Implementation ofClassCache.
-
-
Field Summary
Fields Modifier and Type Field Description private ClassCacheInspectorclassInspectorprivate intsizeprivate Entry<java.lang.Class<?>,V>[]tableprivate static intTABLE_SIZEprivate static intTABLE_SIZE_MASK
-
Constructor Summary
Constructors Constructor Description ClassCacheImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Vget(java.lang.Class<?> key)intgetSize()Vput(java.lang.Class<?> key, V value)voidsetClassInspector(ClassCacheInspector inspector)java.lang.StringtoString()
-
-
-
Field Detail
-
TABLE_SIZE
private static final int TABLE_SIZE
- See Also:
- Constant Field Values
-
TABLE_SIZE_MASK
private static final int TABLE_SIZE_MASK
- See Also:
- Constant Field Values
-
classInspector
private ClassCacheInspector classInspector
-
size
private int size
-
-
Method Detail
-
setClassInspector
public void setClassInspector(ClassCacheInspector inspector)
- Specified by:
setClassInspectorin interfaceClassCache<V>
-
get
public final V get(java.lang.Class<?> key) throws CacheException
- Specified by:
getin interfaceCache<java.lang.Class<?>,V>- Throws:
CacheException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-