|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.ehcache.annotations.key.AbstractCacheKeyGenerator<T>
com.googlecode.ehcache.annotations.key.AbstractDeepCacheKeyGenerator<G,T>
com.googlecode.ehcache.annotations.key.AbstractHashingCacheKeyGenerator<G,T>
public abstract class AbstractHashingCacheKeyGenerator<G,T extends java.io.Serializable>
Common base class for key generators that primarily rely on Object.hashCode(). Has special handling for
Class and Enum types as their default hashCode implementations are not portable between JVM
instances or versions.
| Constructor Summary | |
|---|---|
AbstractHashingCacheKeyGenerator()
|
|
AbstractHashingCacheKeyGenerator(boolean includeMethod,
boolean includeParameterTypes)
|
|
| Method Summary | |
|---|---|
protected void |
append(G generator,
java.lang.Object e)
Append an object to the key. |
protected void |
appendClass(G generator,
java.lang.Class<?> e)
Uses Class.getName() for the hash code |
protected void |
appendEnum(G generator,
java.lang.Enum<?> e)
Uses an object array of Object.getClass() and Enum.name() for the hash code |
protected abstract void |
appendHash(G generator,
java.lang.Object e)
|
protected boolean |
shouldReflect(java.lang.Object element)
Default implementation returns true if the Object doesn't implement hashCode or
doesn't implement equals. |
| Methods inherited from class com.googlecode.ehcache.annotations.key.AbstractDeepCacheKeyGenerator |
|---|
append, append, append, append, append, append, append, append, appendGraphCycle, appendNull, beginRecursion, deepHashCode, deepHashCode, deepHashCode, deepHashCode, endRecursion, generateKey, generateKey, getGenerator, getReflectionHelper, isUseReflection, reflectionDeepHashCode, setReflectionHelper, setUseReflection, toString |
| Methods inherited from class com.googlecode.ehcache.annotations.key.AbstractCacheKeyGenerator |
|---|
generateKey, isCheckforCycles, isIncludeMethod, isIncludeParameterTypes, register, setCheckforCycles, setIncludeMethod, setIncludeParameterTypes, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractHashingCacheKeyGenerator()
public AbstractHashingCacheKeyGenerator(boolean includeMethod,
boolean includeParameterTypes)
| Method Detail |
|---|
protected void appendClass(G generator,
java.lang.Class<?> e)
Class.getName() for the hash code
protected void appendEnum(G generator,
java.lang.Enum<?> e)
Object.getClass() and Enum.name() for the hash code
protected final void append(G generator,
java.lang.Object e)
AbstractDeepCacheKeyGenerator
append in class AbstractDeepCacheKeyGenerator<G,T extends java.io.Serializable>protected boolean shouldReflect(java.lang.Object element)
AbstractDeepCacheKeyGeneratorObject doesn't implement hashCode or
doesn't implement equals.
shouldReflect in class AbstractDeepCacheKeyGenerator<G,T extends java.io.Serializable>element - will never be null
protected abstract void appendHash(G generator,
java.lang.Object e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||