Basically, I want to cut down on a bunch of boilerplate code (needing to 
check if a list of boolean fields are true/false across a collection of 
objects). In normal Java, I can use Class.getDeclaredField and 
Field.getBoolean to do that, something like:


public static boolean allTrue(Class<? extends Object> cls, List<? extends 
Object> things, String fieldName) {
 try {
  Field field = cls.getDeclaredField(fieldName);
  boolean val = true;
  for (Object o : things) {
   val = val && field.getBoolean(o);
  }

  return val;
 } catch (Exception e) {
  return false;
 }
}


I don't see any way to accomplish the same thing in GWT code, at least not 
in the GWT site <http://www.gwtproject.org/doc/latest/RefJreEmulation.html>. 
Is this just not an option under GWT?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to