modelFactories.addFactory(policyFactory);
ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
InterfaceContractMapper interfaceContractMapper = new InterfaceContractMapperImpl();
JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
modelFactories.addFactory(javaFactory);
JavaImplementationFactory javaImplementationFactory = new BeanJavaImplementationFactory(beanFactory);
modelFactories.addFactory(javaImplementationFactory);
BaseJavaClassVisitor[] extensions = new BaseJavaClassVisitor[] {
new ConstructorProcessor(assemblyFactory),
new AllowsPassByReferenceProcessor(assemblyFactory),
new ComponentNameProcessor(assemblyFactory),
new ContextProcessor(assemblyFactory),
new ConversationProcessor(assemblyFactory),
new DestroyProcessor(assemblyFactory),
new EagerInitProcessor(assemblyFactory),
new InitProcessor(assemblyFactory),
new PropertyProcessor(assemblyFactory),
new ReferenceProcessor(assemblyFactory, javaFactory),
new ResourceProcessor(assemblyFactory),
new ScopeProcessor(assemblyFactory),
new ServiceProcessor(assemblyFactory, javaFactory),
new HeuristicPojoProcessor(assemblyFactory, javaFactory),
new PolicyProcessor(assemblyFactory, policyFactory)
};
for (JavaClassVisitor e : extensions) {
javaImplementationFactory.addClassVisitor(e);
}
// Populate ArtifactProcessor registry
DefaultStAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(modelFactories);
ExtensibleStAXArtifactProcessor staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());