Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-alpha-2
-
Component/s: None
-
Labels:None
-
Number of attachments :2
Description
This is from Mike Hogan:
Fellas,
I've attached a jar that contains a very "impressionistic sketch" of what
this dependency stragety thing might look like. It should solidify the
discussions we've been having. I've implemented a constructor strategy and
a method name strategy. Check out
MethodNameDependencyStrategyJUnitTest.java and
ConstructorDependencyStrategyJUnitTest.java.
I think this could be a good addition to Pico and would offer tremendous
flexibility. What ya reckon?
Cheers,
Mike.
-
Hide
- DependencyStrategy.jar
- 10 kB
- Aslak Hellesøy
-
- META-INF/MANIFEST.MF 0.0 kB
- java/.../ComponentFactory2.java 1 kB
- java/.../ConstructorComponentFactory.java 1 kB
- java/.../ConstructorDependencyIntrospector.java 0.2 kB
- java/.../DependencyIntrospector.java 0.1 kB
- java/.../DependencyStrategy.java 0.6 kB
- java/.../HierarchicalPicoContainer2.java 13 kB
- java/.../MethodNameComponentFactory.java 2 kB
- java/.../MethodNameDependencyIntrospector.java 0.8 kB
- test/.../ConstructorDependencyStrategyJUnitTest.java 1.0 kB
- test/.../MethodNameDependencyStrategyJUnitTest.java 1 kB
- test/picocontainer/.../BarneyImpl.java 0.2 kB
- test/picocontainer/.../FredImpl.java 1 kB
- test/picocontainer/testmodel/Wilma.java 0.8 kB
- test/picocontainer/.../WilmaImpl.java 1.0 kB
-
- patch.diff
- 30 kB
- Mike Hogan
Activity
Guys,
Here is the patch for the dependency strategy. There are quite a few files touched. A few comments:
- DefaultComponentFactory and WrongNumberOfConstructorsRegistrationException are no longer needed.
- I dropped the constructor check test from HierarchicalPicoContainerTestCase
Any problems, gimme a shout.
Thanks,
Mike.
Jon, since Mike's patch is similar to yours, I hope you can handle this issue.
Temporarily reassigning to myself to check that email notification works in JIRA. Will set it back to Jon later.
Back to you Jon
Applied with modifications. In fact, Mike Jon and Aslak wrote the same code thrice! CVS has a mix of all of these.
test fish
It looks very good, but it's kinda hard to apply in its current form since you haven't patched HierarchicalPicoContainer/ComponentFactory files, but forked them. This applies to Wilma and Fred too.
Could you upload a new patch by following the patching instructions on XDoclet's JIRA? (In red).
(One of these days I'll write a patch plugin for Maven, with goals for create and apply).
http://opensource.atlassian.com/projects/xdoclet/