Properties componentProperties,
Object componentKey,
Class componentImplementation,
Parameter... parameters) throws PicoCompositionException {
List<BehaviorFactory> list = new ArrayList<BehaviorFactory>();
ComponentFactory lastFactory = makeInjectionFactory();
processSynchronizing(componentProperties, list);
processLocking(componentProperties, list);
processPropertyApplying(componentProperties, list);
processAutomatic(componentProperties, list);
processImplementationHiding(componentProperties, list);
processCaching(componentProperties, componentImplementation, list);
processGuarding(componentProperties, componentImplementation, list);
//Instantiate Chain of ComponentFactories
for (ComponentFactory componentFactory : list) {
if (lastFactory != null && componentFactory instanceof BehaviorFactory) {
((BehaviorFactory)componentFactory).wrap(lastFactory);
}
lastFactory = componentFactory;
}
return lastFactory.createComponentAdapter(componentMonitor,
lifecycleStrategy,
componentProperties,
componentKey,
componentImplementation,
parameters);