use of org.apache.aries.blueprint.ComponentDefinitionRegistryProcessor in project aries by apache.
the class BlueprintContainerImpl method processProcessors.
private void processProcessors() throws Exception {
// Instantiate ComponentDefinitionRegistryProcessor and BeanProcessor
for (BeanMetadata bean : getMetadata(BeanMetadata.class)) {
if (bean instanceof ExtendedBeanMetadata && !((ExtendedBeanMetadata) bean).isProcessor()) {
continue;
}
Class clazz = null;
if (bean instanceof ExtendedBeanMetadata) {
clazz = ((ExtendedBeanMetadata) bean).getRuntimeClass();
}
if (clazz == null && bean.getClassName() != null) {
clazz = loadClass(bean.getClassName());
}
if (clazz == null) {
continue;
}
if (ComponentDefinitionRegistryProcessor.class.isAssignableFrom(clazz)) {
Object obj = repository.create(bean.getId(), Arrays.<Class<?>>asList(ComponentDefinitionRegistryProcessor.class));
((ComponentDefinitionRegistryProcessor) obj).process(componentDefinitionRegistry);
} else if (Processor.class.isAssignableFrom(clazz)) {
Object obj = repository.create(bean.getId(), Arrays.<Class<?>>asList(Processor.class));
this.processors.add((Processor) obj);
} else {
continue;
}
updateUninstantiatedRecipes();
}
}
Aggregations