com.googlecode.ehcache.annotations.key
Class CachingReflectionHelper

java.lang.Object
  extended by com.googlecode.ehcache.annotations.key.CachingReflectionHelper
All Implemented Interfaces:
ReflectionHelper

public final class CachingReflectionHelper
extends java.lang.Object
implements ReflectionHelper

ReflectionHelper that uses a cache to track reflection operations. A background thread is started on first usage to perform cache cleanup to avoid class reference leaks. Code that uses this class should call #destroy() when complete to ensure the cleanup thread shuts down.

Version:
$Revision: 656 $
Author:
Eric Dalquist

Field Summary
protected  org.slf4j.Logger logger
           
 
Constructor Summary
CachingReflectionHelper()
           
 
Method Summary
 void clearCache()
           
 boolean implementsEquals(java.lang.Object element)
          Checks if the object implements equals
 boolean implementsHashCode(java.lang.Object element)
          Checks if the object implements hashCode
 boolean implementsToString(java.lang.Object element)
          Checks if the object implements equals
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger
Constructor Detail

CachingReflectionHelper

public CachingReflectionHelper()
Method Detail

implementsHashCode

public boolean implementsHashCode(java.lang.Object element)
Description copied from interface: ReflectionHelper
Checks if the object implements hashCode

Specified by:
implementsHashCode in interface ReflectionHelper
Parameters:
element - will never be null

implementsEquals

public boolean implementsEquals(java.lang.Object element)
Description copied from interface: ReflectionHelper
Checks if the object implements equals

Specified by:
implementsEquals in interface ReflectionHelper
Parameters:
element - will never be null

implementsToString

public boolean implementsToString(java.lang.Object element)
Description copied from interface: ReflectionHelper
Checks if the object implements equals

Specified by:
implementsToString in interface ReflectionHelper
Parameters:
element - will never be null

clearCache

public void clearCache()


Copyright © 2011. All Rights Reserved.