On Thu, Feb 5, 2009 at 12:28 AM, BobV <b...@google.com> wrote: > http://google-web-toolkit.googlecode.com/svn/changes/bobv/elide_rpc_type_names_r4602 > Future changes: > - A compiler flag or optional module to neuter Class.getName().
I've added an -XdisableClassMetadata flag to this branch. This disables: - Class.getName() -> returns "Class$<hashCode()>" - Class.getSuperclass() -> returns null - Class.toString() -> returns Object.toString() You can still use class.getName() as an equality comparison, but not for anything that requires semantic meaning; the relationships between the strings will be constant throughout the lifetime of the module. A.class == A.class != B.class A.class.getName() == A.class.getName() != B.class.getName() With this flag enabled, class literal setup for non-enum types is a simple JS new operation. It reduces the total amount of code generated in a showcase compile by 10% based on "find war -name '*.cache.html' -o -name '*.cache.js' | xargs wc". -- Bob Vawter Google Web Toolkit Team --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---