@NotSerializable, however, doesn't capture the "serializable for other purposes, just not for GWT" semantic. Granted, the FQCN of the annotation specifies that it's a GWT annotation, but it may still be worth putting something into the base name, e.g. @NotGwtSerializable. However, moving towards Bruce's comment about more general use cases and trying to retain some sense of "cool," we might consider @SerializationHints(...) or @GwtSerializationHints(...), using the value to specify attributes: @SerializationHints(TRANSIENT), @SerializationHints(@Nullable Class[] whitelist, @Nullable Class[] blacklist), @SerializationHints(OBFUSCATEDCLASSNAMES), etc.
(A value-sensitive annotation also concerns me less if it doesn't basename-identify as "Gwt," but that may be my aesthetic quirk.) On Thu, Nov 13, 2008 at 8:41 PM, Bruce Johnson <[EMAIL PROTECTED]> wrote: > Minor nit regarding the terminology, probably mostly just aesthetic on my > part. "GwtTransient" doesn't sound that cool to me. > Could we name it now to align with a more comprehensive effort later > related to more developer control of RPC? For example, what if we called the > annotation @NotSerializable. Then, we could also honor the annotation > applying to an entire class in addition to fields. If that spanned > inheritance, then it would be an easy way to blacklist entire hierarchies of > classes. > > It isn't perfect, but we'd get a useful first step toward an full-featured > RPC whitelist/blacklist facility. (In the general case, of course, you want > to specify serializable-ness relative to a particular RPC service interface, > not on the class itself. But it's a start...) > > > On Thu, Nov 13, 2008 at 11:30 AM, Lex Spoon <[EMAIL PROTECTED]> wrote: > >> Bob, can you review the small attached patch? I can ask others if you >> are slammed, but it's small and affects code you are familiar with, so >> I thought I'd ask you first. >> >> This patch implements support for a @GwtTransient annotation. >> @GwtTransient means the same thing as the transient keyword, but it is >> ignored by all serialization systems other than GWT's. Usually the >> <code>transient</code> keyword should be used in preference to this >> annotation. However, for types used with multiple serialization >> systems, it can be useful. The motivation is discussed further in >> these bug reports: >> >> http://code.google.com/p/google-web-toolkit/issues/detail?id=2931 >> http://code.google.com/p/google-web-toolkit/issues/detail?id=2964 >> >> >> The patch simply adds the annotation and checks it in the places >> isTransient is currently checked. So, from GWT's point of view, >> isTransient and @GwtTransient are equivalent. >> >> >> -Lex >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
