[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: StructureContext and candidate annotations

alesj do-not-reply at jboss.com
Wed Aug 6 06:59:14 EDT 2008


"alesj" wrote : 
  | Where MockEARStructureDepolyer then checks in
  | Module's StructureContext if we have any matching annotation.
  | 
In order to do this, I need some way to get a child StructureContext from parent StructureContext:
e.g.

  |    private Integer determineType(StructureContext context, VirtualFile archive) throws Exception
  |    {
  |       boolean recognised = context.determineChildStructure(archive);
  |       if (recognised)
  |       {
  |          StructureContext subContext = context.getChildContext(archive);
  |          Set<Class<? extends Annotation>> foundAnnotations = subContext.getFoundAnnotations();
  |          if (foundAnnotations.contains(Stateless.class))
  |             return J2eeModuleMetaData.EJB;
  |       }
  | 

Where is the best way/place to store this info?
While creating new StructureContext?

  |    public StructureContext(VirtualFile root, VirtualFile parent, VirtualFile file, StructureMetaData metaData, VFSStructuralDeployers deployers, StructureContext parentContext)
  |    {
  |       ...
  |       this.parentContext = parentContext;
  |       if (parentContext != null)
  |       {
  |          // ADD CHILD INFO HERE
  |       }
  |    }
  | 

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

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



More information about the jboss-dev-forums mailing list