[jboss-dev-forums] [JBoss Microcontainer Development] - Re: Adding getAnnotationsAnnotatedWith() to MDR

kabir.khan@jboss.com do-not-reply at jboss.com
Mon Dec 7 09:59:10 EST 2009


When creating the BasicAnnotationsItem for the cache from the CachingMDC I need a reference to a MetaDataLoader which is used to determine if it is cachable:

  |    public BasicAnnotationItem(MetaDataLoader loader, T annotation)
  |    {
  |       super(loader, annotation.annotationType().getName(), annotation);
  |    }
  | 
  |    public T getAnnotation()
  |    {
  |       return getValue();
  |    }
  | 
CachingMDC does not implement MetaDataLoader so I can't pass in 'this'. My current ideas are either:
-make CachingMDC implement MDL and always return true from isCachable()
-create a MDL implementation that returns true if all the AnnotationItems are cachable, otherwise return false.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269360#4269360

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269360



More information about the jboss-dev-forums mailing list