Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.1
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
I've been struggling with collection/array/composite-style dependencies (see PICO-202) and wrote these implementations of the Parameter interface as a more flexible way of configuring dependencies on collections and arrays.
Advantages over existing GenericCollectionComponentAdapter:
- Implementation feels cleaner than the way that GCCA is currently integrated into ComponentParameter paves the way for some refactoring cleanup of ComponentParameter
- Supports dependencies on pre-JDK1.5 Collections.
- Default behavior is to fill a collection with every other component in the container, but included Constraint classes allow filtering/narrowing of the instances to include.
- Constraints can be applied to array dependencies as well (for wide-open Object[] dependencies)
- Automatically filters out the target adapter to avoid a cyclic dependency (this seems to be broken in the current code, see the ConstraintIntegrationTestCase.FAILtestUnambiguousTouchableDependency test)
So, just thought I'd submit the code and see if there is any interest in using this approach going forward.
Looking forward to see what you all think!
/Nick
Issue Links
Activity
Nick Sieger
made changes -
Field | Original Value | New Value |
---|---|---|
Attachment | parameter-constraints.tar.gz [ 12870 ] |
Jörg Schaible
made changes -
Jörg Schaible
made changes -
Jörg Schaible
made changes -
Jörg Schaible
made changes -
Jörg Schaible
made changes -
Fix Version/s | 1.1 [ 10307 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Two more potential improvements: