As mentioned in the detailed comments, because more classes will pass the isAnonymous() filter, the matching algorithm will break.
Perhaps isAnonymous() can be renamed to isLocal() (since that is exactly what is being computed). isAnonymous() can then be isLocal() && isClassnameGenerated(getBinaryName()). Is that feasible? http://gwt-code-reviews.appspot.com/89817/diff/1/2 File dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java (right): http://gwt-code-reviews.appspot.com/89817/diff/1/2#newcode546 Line 546: if (cc.isAnonymous() More classes will pass this test now. http://gwt-code-reviews.appspot.com/89817/diff/1/3 File dev/core/src/com/google/gwt/dev/javac/CompiledClass.java (right): http://gwt-code-reviews.appspot.com/89817/diff/1/3#newcode83 Line 83: anonymous = true; I was referring to classes such as: foo() { class Bar { ... } new Bar(); } Bar is a local class but is not an anonymous class. If we are indeed interested in all local classes, perhaps this variable should be called 'local' instead of 'anonymous' I do think the previous code excluded local classes from anonymous classes. The anonymous class matching code will probably break because CompilationUnit::getJdtClassNames(...) will now return more classes. On 2009/11/03 23:01:33, scottb wrote: > Not sure I under the question? I'm considering all local classes to be > anonymous here, whether they are one directly, or are contained in one. Even a > named local class cannot be accessed outside of its containing method. http://gwt-code-reviews.appspot.com/89817 --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---