Looking at this more closely now, its a pretty chatty API.

What's with all the "Map because Enum.valueOf does not work in GWT" stuff?
That's untrue, yes? It's not as efficient as it should be (
http://code.google.com/p/google-web-toolkit/issues/detail?id=2046), but I
hate polluting our API due to a compiler flaw, especially for such tiny
lists of values.
All these "clearFoo" methods are really noisy. I hate to encourage null as a
parameter value, but I'd actually rather see setFoo(null) than five thousand
clear*() methods. An alternative would be to have an UNSET value in each
enum, but that seems nearly as cumbersome as all these clear methods.

We'd also have to change the numeric ones from int and double to Integer and
Double--is the compiler good about that?

The getBlahAsString methods are more noise. The appropriate properties
should implement String asString() (leaning on toString() in a public api is
a bad habit to encourage). Perhaps they can implement a StringBasedStyle
interface defining that method.

rjrjr

2009/3/29 Freeland Abbott <fabb...@google.com>

> As we'd discussed earlier, here's a cut at giving our Style class explicit
> accessors for the various property attributes.
>
> (Not that it matters, but the only thing I *really* hate about our
> checkstyle alphabetization is that it splits clear/get/setFoo apart.  C'est
> la vie.)
>
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to