[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: MDR doesn't work on annotated privates

adrian@jboss.org do-not-reply at jboss.com
Fri Aug 15 08:17:45 EDT 2008


"adrian at jboss.org" wrote : 
  | Alternatively, we could change MethodSIgnature to include the "DeclaringClass"
  | in its equals(). But then people who don't know the DeclaringClass,
  | e.g. populating metadata from xml would have to do the findMethod().getDeclaringClass()
  | upfront to populate the MethodSignature, otherwise the equals() would no longer work.
  | 

If you're willing to put the analysis work into making sure that adding the
declaring class to the signature's equals() doesn't break existing use cases
then I would be to change my position.

e.g. the MC "knows" the declaring class when it populates the xml
since it matches the xml elements to ClassInfo/MethodInfo, etc.


  |    private void updateAnnotations(MutableMetaDataRepository repository, ClassLoader classloader, ComponentMutableMetaData component, KernelControllerContext context, MethodInfo methodInfo, Set<AnnotationMetaData> annotations, boolean add)
  |    {
  |       if (annotations == null || annotations.isEmpty())
  |          return;
  | 
  |       Signature signature = new MethodSignature(methodInfo);
  |       ScopeKey scope = new ScopeKey(CommonLevels.JOINPOINT_OVERRIDE, methodInfo.getName());
  |       updateAnnotations(repository, classloader, component, context, signature, scope, annotations, add);
  |    }
  | 

but that doesn't mean everywhere else knows.

If you are not willing to do the analysis, then I'm not prepared to spend
weeks fixing things broken by this change. :-)

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

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



More information about the jboss-dev-forums mailing list