Hey,
I have now added support for assembly visitors. These can be used to
perform assembly operations based on the visitor pattern.
One example, in combination with the new contextual modifiers, would be
to "Apply TraceConcern to all Composites in the Application", which
could be implemented as:
public void assemble(ModuleAssembly module)
{
module.layerAssembly().applicationAssembly().visit( new
AssemblyVisitorAdapter()
{
public void visitComposite( CompositeDeclaration declaration )
{
declaration.withConcerns( TraceConcern.class );
}
}
}
--
There are visit* methods for all kinds of declarations, and the visitor
also gets callbacks for each level of assembly that is visited. The
AssemblyVisitorAdapter implements all methods so that it is easy to
create subclasses which only override one or a few methods.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev