Currently the creation of the default parameters is hard-wired in ICA.createDefaultParameters(). We had now 3 issues on the list, where another Parameter-Implementation instead of ComponentParameter would have been better:
Configuration aware (Julian Stern's problem):
We might either move createDefaultParameter to (Mutable)PicoContainer or to create a container that overwrites the fucntion or have an additional ctor arg for ICA:
class ICA {
public ICA(Object componentKey, Class componentImplementation, Parameter[] parameters, ParameterFactory factory){
...
}
public ICA(Object componentKey, Class componentImplementation, Parameter[] parameters){
this(comüponentKey, componentImplementation, parameters, new DefaultParameterFactory())
}
}
class ParameterFactory() {
Parameter getDefaultParaeterForType(Class type);
}
========
Add a ParameterFactory as optional Parameter to DefaultPC and create the method PicoContainer.createDefaultParameter(Class type).
BENEFIT:
========
PICO-216he can turn off collections, with Thomas' AutoConfigParameter he can use a configuration as default or with Nick's constraintsPICO-206create even more sophisticated strategies.