开发者

Avoid anonymous inner classes in GWT command pattern

I use GWT-dispatcher for my GWT-app to get the benefits of command-pattern. As the number of server calls grows the number of anony开发者_如何学Pythonmous inner classes also grows and clutters the code. Is there a design tip on how to extract these anonymous inner classes and their onSuccess and onFailure from the rest of the code (in my case the Activity)?


You can declare named inner classes instead. These classes can even be static if they don't need to access the instance of the outer class, though this is not important for code to be compiled by GWT.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜