[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Annotation processing

adrian@jboss.org do-not-reply at jboss.com
Tue Sep 4 06:30:53 EDT 2007


"alesj" wrote : 
  | What's the difference between local and non-local retrievers (from MetaDataContext):
  | 
  |   |    /**
  |   |     * Get the retrievals
  |   |     * 
  |   |     * @return the retrievals
  |   |     */
  |   |    List<MetaDataRetrieval> getRetrievals();
  |   | 
  |   |    /**
  |   |     * Get the local retrievals
  |   |     * 
  |   |     * @return the local retrievals
  |   |     */
  |   |    List<MetaDataRetrieval> getLocalRetrievals();
  |   | 
  | 
  | A MetaDataContext is made of local retrievals and a parent context.
  | retrievals = local + parent retrievals.
  | 
  | anonymous wrote : 
  |   | Any quick tips on how MetaData.hasInstanceMetaData() should look like?
  |   | Should it still use MetaDataContext as current impl in AOPConstructorJoinpoint does?
  | 
  | Just move the AOP alogrithm into the MetaData/bridge.
  | i.e. see whether the backing MetaDataContext has an INSTANCE scope
  | and whether that scope has local annotations or metadata.
  | 
  | A more complete api would be to allow
  | MetaData.getScopeMetaData(ScopeKey)
  | which would produce a MetaData backed by the local retrievals of that scope
  | and add an isEmpty() to the MetaData api.
  | 
  | The hasInstanceMetaData() could then be implemented as:
  | 
  |   | MetaData instance = getScopedMetaData(instanceScope);
  |   | return instance.isEmpty();
  |   | 
  | making it redundant.
  | 
  | But that might be a bit more complicated to implement with the caching, etc.?

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

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



More information about the jboss-dev-forums mailing list