Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.0-beta-5
-
Fix Version/s: 2.8
-
Component/s: PicoContainer (Java)
-
Labels:None
-
Number of attachments :
Description
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):
- http://lists.codehaus.org/pipermail/picocontainer-dev/2004-April/003406.html
Thomas Heller's AutoConfigParameter: - http://lists.codehaus.org/pipermail/picocontainer-dev/2004-April/003407.html
Thomas Heller's problem with the Pico autoregistration: - http://lists.codehaus.org/pipermail/picocontainer-dev/2004-April/003295.html
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);
}
Issue Links
Activity

Field | Original Value | New Value |
---|---|---|
Fix Version/s | 1.0 [ 10423 ] | |
Fix Version/s | 1.0.1 [ 10307 ] | |
Summary | refactore creation of default parameters | refactor creation of default parameters |



Fix Version/s | 1.2 [ 11330 ] | |
Environment | ||
Fix Version/s | 1.3 [ 11331 ] |




Fix Version/s | 1.3 [ 11331 ] | |
Fix Version/s | 2.3 [ 14303 ] |

Fix Version/s | 2.4 [ 14362 ] | |
Fix Version/s | 2.3 [ 14303 ] |

Fix Version/s | 2.4 [ 14362 ] | |
Fix Version/s | 2.5 [ 14424 ] |

Fix Version/s | 2.5 [ 14424 ] | |
Fix Version/s | 2.6 [ 14481 ] |

Fix Version/s | 2.7 [ 14663 ] | |
Fix Version/s | 2.6 [ 14481 ] |

Fix Version/s | 2.7 [ 14663 ] | |
Fix Version/s | 2.8 [ 14920 ] |
PROPOSAL:
========
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.