From: Jody G. <jga...@re...> - 2005-03-17 05:06:55
|
I am quite happy with this result - it is fairly clean. We may talk me out of pico container yet. Looking forward to your feedback on this latest implementation Marin. Goodnight, Jody > Now there is a good subject line - you will find the hack here: > - > http://svn.geotools.org./geotools/gt/ext/experimental/src/org/geotools/data/Hack.java: > > > It has a generic implementation of: > - Object get( Class myType ) > - Class systemDefault( Class myType ) > > The get( MyType.class ) method has the following order: > - a previously generated or user supplied instance > - an instance created with new MyTypeSubType( Map ) > - an instance created with new MyTypeSubType() > where: MyTypeSubType may be provided by systemDefault( MyType.class ) > > This makes use of custom handling for GeometryFactory.class: > - a previously generated or user supplied instance > - an instance created with new GeometryFactorySubType( Map ) > - an instance created with new GeometryFactorySubType( get( > CoordinateSequenceFactory.class) ) > - an instance created with new GeometryFactorySubType() > where: GeometryFactorySubType may be provided by systemDefault( > GeometryFactory.class ) > > I think that has it. We may need to add additional hacks for third any > third party factory classes, or we can break out a mess of reflection > like pico container does. > Jody |