[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Field signature usage
adrian@jboss.org
do-not-reply at jboss.com
Mon Mar 17 10:21:46 EDT 2008
"alesj" wrote : "adrian at jboss.org" wrote :
| | If you've done the field properties correctly, then this should just be
| | a case of using propertyInfo.get(Underlying)Annotations()
| | i.e. no getters/setters means use the field to get the annotations, but this
| | is all hidden from the caller - they are "property annotations"
| I'll still need that AnnotatedElementMetaDataLoader field change, for non-public fields.
| It's the way I do annotation lookup in AbstractBeanAnnotationAdapter, going over MetaData to do the lookup:
|
| | FieldInfo field = pi.getFieldInfo();
| | if (field != null)
| | {
| | Signature sis = new FieldSignature(field);
| | MetaData cmdr = retrieval.getComponentMetaData(sis);
| | if (cmdr != null)
| | {
| | for(AnnotationPlugin plugin : fieldAnnotationPlugins)
| | {
| | if (isApplyPhase)
| | plugin.applyAnnotation(field, cmdr, visitor);
| | else
| | plugin.cleanAnnotation(field, cmdr, visitor);
| | }
| | }
| | else if (trace)
| | log.trace("No annotations for field " + field.getName());
| | }
| |
| If the field is non-public and the mode is non-standard, this field will be a part of propertys, but I don't want to distinct between underlying annotations and instance annotations (which are only in metadata, right).
You really need to learn to explain things from first princples.
I don't even understand if there is a question in your post
let alone what it is or what problem you are considering.
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.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137074#4137074
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137074
More information about the jboss-dev-forums
mailing list