|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.elca.el4j.util.metadata.DefaultGenericMetaDataSource
public class DefaultGenericMetaDataSource
The default implementation of the GenericAttributeSource interface.
Field Summary | |
---|---|
protected Map<String,Collection> |
m_cache
Cache of Attributes, keyed by Method and target class. |
protected static Collection |
NULL_METADATA
Canonical value held in cache to indicate that no metadata was found for a method. |
Constructor Summary | |
---|---|
DefaultGenericMetaDataSource()
|
Method Summary | |
---|---|
protected Collection |
computeMetaData(Method method,
Class targetClass)
Same as method getMetaData(Method, Class) but without caching
of the result. |
protected Collection |
filterMetaData(Collection metaData)
|
protected Collection |
findAllAttributes(Class clazz)
|
protected Collection |
findAllAttributes(Method m)
|
protected String |
getCacheKey(Method method,
Class targetClass)
Calculates the cache key of a certain method in a certain class. |
List<Class> |
getInterceptingMetaData()
|
Collection |
getMetaData(Method method,
Class targetClass)
|
Attributes |
getMetaDataDelegator()
Getter method to get the metadata implementation. |
void |
setInterceptingMetaData(List<Class> interceptedAttributes)
Setter method for the list of metadata types where to apply the interceptor. |
void |
setMetaDataDelegator(Attributes metaDataDelegator)
Setter method to set the metadata implementation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Collection NULL_METADATA
protected final Map<String,Collection> m_cache
Constructor Detail |
---|
public DefaultGenericMetaDataSource()
Method Detail |
---|
protected String getCacheKey(Method method, Class targetClass)
method
- method for the current invocation.targetClass
- targetClass for this invocation. May be null.
public Collection getMetaData(Method method, Class targetClass)
getMetaData
in interface GenericMetaDataSource
method
- Is the method for the current invocation. Must not be null.targetClass
- target class for this invocation. May be null.
protected Collection computeMetaData(Method method, Class targetClass)
getMetaData(Method, Class)
but without caching
of the result.
method
- Is the method for the current invocation. Must not be null.targetClass
- target class for this invocation. May be null.
protected Collection findAllAttributes(Method m)
m
- Is the method to retrieve metadata for.
null
if no metadata could be found.protected Collection findAllAttributes(Class clazz)
clazz
- Is the class to retrieve metadata for.
null
if no metadata could be found.protected Collection filterMetaData(Collection metaData)
metaData
- Are the metadata to filter.
null
if the returned collection would be empty. Only intercepting
metadata will endure the filter process.public Attributes getMetaDataDelegator()
GenericMetaDataSource
getMetaDataDelegator
in interface GenericMetaDataSource
public void setMetaDataDelegator(Attributes metaDataDelegator)
GenericMetaDataSource
setMetaDataDelegator
in interface GenericMetaDataSource
metaDataDelegator
- Is the metaDataDelegator to set.public List<Class> getInterceptingMetaData()
getInterceptingMetaData
in interface GenericMetaDataSource
public void setInterceptingMetaData(List<Class> interceptedAttributes)
setInterceptingMetaData
in interface GenericMetaDataSource
interceptedAttributes
- Is the metadata type list.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |