In my case, getter and setters will only be used in the server. Not
even in the RPC server implementation, but in a called EJB so, as long
as you don't use the getter or setter in the code, they can be
ignored. If you use them, failing the compilation would be enough.

Let's say that you have Class A with a transient method A.field marked
as transient in java or with the GwtTransient annotation:

- Mark field A.field and every method in A that uses field as
unavailable.
- If you find in the client code a class that uses A.field or any of
the methods of A marked as unavailable, fail the compilation and
inform the user about "Line X,Y: Use of transient method A.method".
- Now the user either, removes the calling method from its code or
removes the transient keyword from the field.

In my case, that wold be enough since I will not ever call any of this
getter or setters in the GWT code.



On 21 ene, 18:54, Chris Lercher <[email protected]> wrote:
> On Jan 21, 6:32 pm, Warpitaly <[email protected]> wrote:
>
> > I there-say that ignoring fields marked as @transient should be quite
> > easy to implement...
>
> If none of the gwt compiled code will access the field, it's certainly
> easy. But that's unlikely (you have getters and setters, right?).
>
> If some of your client code does access the field - and this can
> happen indirectly - the class signature will be required. But how do
> you know that at compile time, if you can't compile the methods that
> access the fields (because they would need the class signature,
> too)... Chicken and egg problem. Probably it can be solved, but 'easy
> to implement' might be an understatement.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to