final InjectionContext injectionContext,
final IOCConfigProcessor processorFactory,
final List<MetaClass> beforeTasks,
final List<MetaClass> afterTasks) {
final MetaDataScanner scanner = ScannerSingleton.getOrCreateInstance();
/*
* IOCDecoratorExtension.class
*/
final Set<Class<?>> iocExtensions = scanner
.getTypesAnnotatedWith(org.jboss.errai.ioc.client.api.IOCExtension.class);
final List<IOCExtensionConfigurator> extensionConfigurators = new ArrayList<IOCExtensionConfigurator>();
try {
for (final Class<?> clazz : iocExtensions) {
final Class<? extends IOCExtensionConfigurator> configuratorClass
= clazz.asSubclass(IOCExtensionConfigurator.class);
final IOCExtensionConfigurator configurator = configuratorClass.newInstance();
configurator.configure(injectionContext.getProcessingContext(), injectionContext, processorFactory);
extensionConfigurators.add(configurator);
}
}
catch (Exception e) {
throw new ErraiBootstrapFailure("unable to load IOC Extension Configurator: " + e.getMessage(), e);
}
computeDependentScope(context, injectionContext);
final Collection<MetaClass> bootstrapClassCollection = ClassScanner.getTypesAnnotatedWith(IOCBootstrapTask.class);
for (final MetaClass clazz : bootstrapClassCollection) {
final IOCBootstrapTask task = clazz.getAnnotation(IOCBootstrapTask.class);
if (task.value() == TaskOrder.Before) {
beforeTasks.add(clazz);
}
else {
afterTasks.add(clazz);
}
}
/**
* CodeDecorator.class
*/
final Set<Class<?>> decorators = scanner.getTypesAnnotatedWith(CodeDecorator.class);
try {
for (final Class<?> clazz : decorators) {
final Class<? extends IOCDecoratorExtension> decoratorClass = clazz.asSubclass(IOCDecoratorExtension.class);
Class<? extends Annotation> annoType = null;