[jboss-dev-forums] [JBoss Microcontainer Development] - Re: Adding getAnnotationsAnnotatedWith() to MDR
alesj
do-not-reply at jboss.com
Mon Dec 7 10:27:14 EST 2009
I had something along this lines in mind
| public AnnotationsItem retrieveAnnotationsAnnotatedWith(Class<? extends Annotation> meta)
| {
| Map<Class<?>, AnnotationsItems> index = retriveAnnotationsIndex();
| return new Commulative(this, true, index.get(meta));
| }
|
where CachingMDC does
| protected Map<Class<?>, AnnotationsItem> retriveAnnotationsIndex()
| {
| Map<Class<?>, AnnotationsItem> cached = cache.get(key);
| if (cached == null)
| {
| cached = super.retriveAnnotationsIndex();
| cache.put(key, cached);
| }
| else
| // validate, etc, ...
|
| return cached;
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269373#4269373
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269373
More information about the jboss-dev-forums
mailing list