protected Instantiator buildInstantiator(Component component) {
if ( component.isEmbedded() && ReflectHelper.isAbstractClass( component.getComponentClass() ) ) {
return new ProxiedInstantiator( component );
}
if ( optimizer == null ) {
return new PojoInstantiator( component, null );
}
else {
return new PojoInstantiator( component, optimizer.getInstantiationOptimizer() );
}
}