rodionmoiseev / c10n

A Java library, focused on making internationalisation more modular, easier to evolve and maintain, robust-to-change and IDE-friendly without excess of external tools.
Apache License 2.0
67 stars 10 forks source link

Support annotations directly on delegates #10

Closed rodionmoiseev closed 11 years ago

rodionmoiseev commented 11 years ago

Consider the following use case:

interface Window{
  @En("Dialog title")
  Dialog dialog();
}

interface Dialog{
  @En("OK")
  String ok();
}

Currently, in order to get dialog title, one has to create an explicit Dialog.title() method, where as, it would be nice to be able to use the delegating method itself for holding the title. Thus, one would call System.out.println(window.dialog()) and that would print "Dialog title".