[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Annotation features
alesj
do-not-reply at jboss.com
Mon Jul 23 09:54:46 EDT 2007
"adrian at jboss.org" wrote :
| Instead, you should use the MetaData from the MetaDataRepository for that instance.
| That is where the overridden annotations are stored at the instance level.
|
| BasicKernelMetaDataRepository.java
|
| /**
| * Initialise metadata retrieval
| *
| * TODO lots more work
| * @param context the context
| * @return the retrieval
| */
| protected MetaDataRetrieval initMetaDataRetrieval(KernelControllerContext context)
| {
| MutableMetaDataRepository repository = getMetaDataRepository();
| ScopeKey scopeKey = context.getScope();
| ArrayList<MetaDataRetrieval> retrievals = new ArrayList<MetaDataRetrieval>();
| for (Scope scope : scopeKey.getScopes())
|
This is probably where this should already be stored/done, but the TODO is not that overwhelming ... :-)
I'm trying to do this:
| // properties
| Set<PropertyInfo> properties = info.getProperties();
| if (properties != null && properties.isEmpty() == false)
| {
| for(PropertyInfo pi : properties)
| {
| Signature pis = new MethodSignature(pi.getName(), Configurator.getParameterTypes(trace, new TypeInfo[]{pi.getType()}));
| MetaDataRetrieval cmdr = retrieval.getComponentMetaDataRetrieval(pis);
| if (cmdr != null)
| {
| System.out.println("cmdr = " + cmdr);
| }
| }
| }
|
Or what's the way to 'join' info from MetaDataRetrieval and [Class|Property|Method]Info, and populate BeanMetaData.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066662#4066662
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066662
More information about the jboss-dev-forums
mailing list