[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Field signature usage

alesj do-not-reply at jboss.com
Mon Mar 17 10:32:15 EDT 2008


"adrian at jboss.org" wrote : 
  | You really need to learn to explain things from first principles.
  | 
Yup, known old problem. :-)


"adrian at jboss.org" wrote : 
  | I don't even understand if there is a question in your post
  | let alone what it is or what problem you are considering.
  | 
The problem that I have is that non-public fields are not part of MetaData.
The AEMDL only handles public fields:

  |    public MetaDataRetrieval getComponentMetaDataRetrieval(Signature signature)
  |    {
  |          ...
  |          else if (signature instanceof FieldSignature)
  |          {
  |             try
  |             {
  |                Field field = clazz.getField(signature.getName());
  |                return new AnnotatedElementMetaDataLoader(field);
  |             }
  |             catch (NoSuchFieldException e)
  |             {
  |                return null;
  |             }
  |          }
  |       }
  | 
Which means I cannot use the MetaData to get the underlying annotations for non-public fields, like I do it in my AbstractBeanAnnotationAdapter.

The question is, should/can I change the impl of AEMDL to handle non-public fields as well?

Better? :-)

"adrian at jboss.org" wrote : 
  | Assume I know nothing about AnnotatedElementMetaDataLoader
  | (which I don't, other than it exists - you wrote it and I've never reviewed this code :-)
  | or how it fits into the MC deployment protocol.

Nope, you wrote it, I just filled some of the missing pieces. ;-)

  | /**
  |  * AnnotatedElementMetaDataLoader.
  |  * 
  |  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  |  * @version $Revision: 67291 $
  |  */
  | public class AnnotatedElementMetaDataLoader extends BasicMetaDataLoader 
  | 

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

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



More information about the jboss-dev-forums mailing list