public class TapestryExtension extends AbstractGlobalExtension {
public void visitSpec(SpecInfo spec) {
Set<Class<?>> modules = collectModules(spec);
if (modules == null) return;
IMethodInterceptor interceptor = new TapestryInterceptor(spec, modules);
spec.addSharedInitializerInterceptor(interceptor);
spec.addInitializerInterceptor(interceptor);
spec.addCleanupSpecInterceptor(interceptor);
}