Oh I see - this was simply my misunderstanding :-(

I thought that:
1) Key was a Data Object (and used the className for its comparison)
2) They id would be used to check a system property
3) We could make different Key implementations that performed the 
acceptable value check differently

You will find I have implemented FileKey - and it ensure that a 
Directory is present, or can be created using the provided File (or 
String). I also use reflection on the Hints (looking for static final 
fields ) in order to figure GeoTools.getDefaultHints() based on system 
properties.

I will think about this a bit more, it seemed that you wanted to isolate 
all GeoTools Keys into a single class? I was thinking that plug-ins 
could define their own hints, and we would need a FactorySPI extension 
point in order to play the reflection game across plug-ins. Although 
that would have classloader issues, I like your careful use of Strings 
in order to avoid classloader problems in the existing Key implementation.

Cheers,
Jody

Martin Desruisseaux wrote:
> Jody Garnett a écrit :
>> Please correct me if I am wrong .. it looks like adding a Hint as a 
>> value does not work?
> I'm not sure what is your intend? Hints.Key instances are used 
> directly as key in HashMap. The argument given to the constructor is a 
> constraint to apply on the value provided in:
>
>     RenderingHints.put(key, value);
>
> For which reason do you need an arbitrary String to be stored as a 
> field straight into Hints.Key instance, as opposed to a (key, value) 
> association in a HashMap (or Hints)?
>
>     Martin


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to