|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.javalid.core.support.CacheSupport
public class CacheSupport
This special class provides cache support for the AnnotationValidatorImpl for caching bean instances. Access is only possible through one of the exposed methods, allowing the cache mechanism to change somewhere in the future if needed (e.g. using ehcache instead of the cache here).
| Constructor Summary | |
|---|---|
CacheSupport()
|
|
| Method Summary | |
|---|---|
void |
addBeanToCache(java.lang.Object instance)
Adds given instance to the cache (using instance.getClassName() as key). |
java.lang.Object |
getBeanFromCache(java.lang.Class clazz)
Returns instance from cache if found, null otherwise. |
java.lang.Object |
getBeanFromCache(java.lang.String className)
Returns instance from cache if found, null otherwise. |
boolean |
isBeanInCache(java.lang.Class clazz)
Return true if for given clazz an instance is in the cache. |
boolean |
isBeanInCache(java.lang.String className)
Return true if for given className an instance is in the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheSupport()
| Method Detail |
|---|
public boolean isBeanInCache(java.lang.Class clazz)
clazz - The clazz to check
public boolean isBeanInCache(java.lang.String className)
className - The className to check
public void addBeanToCache(java.lang.Object instance)
instance - The instance to add to cachepublic java.lang.Object getBeanFromCache(java.lang.Class clazz)
clazz - The class to check for
public java.lang.Object getBeanFromCache(java.lang.String className)
className - The className to get
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||