I am hacking away and running into a lot of things like this:
StyleFactoryFinder.createStyleFactory().getDefaultStroke()
I take it we these are capture "defaults", just to confirm these are basically NullObjects?
Subsituted in when we don't have a real value ...

Here is what I am thinking:
StyleFactory.createLineSymbolizer(): LineSymbolizer
StyleFactory.getDefaultLineSymbolizer(): LineSymbolizer

Becomes:
StyleFactory.createLineSymbolizer(): LineSymbolizer
DefaultStyleFactory.createLineSymbolizer(): LineSymbolizer

And with Java 5:
StyleFactory.createLineSymbolizer(): LineSymbolizer
DefaultStyleFactory.createLineSymbolizer(): DefaultLineSymbolizer

Basically can we be smart and collapse some of this code?
interface LineSymbolizer {
   public final LineSymbolizer Default = new LineSymbolizer(){ ... }
}

Pros: This has the advantage of documenting the defaults in the class that
source file that manages the idea.
Cons: May restrict client code from setting up user determined defaults (is that even smart?)

Jody





-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to