@Getter annotation?
With all the innovation in annotations, see Web Beans or Google Guice, just a saturday morning idea: Why not drop the annoying get* convention and replace it with some annotations? The API wouldn’t be as short, but the usage of a getter looks nicer and more fluent. And of course the IDE could hide the @Getter annotation, just as it hides the imports.
@Getter
public Context context() {
return context;
}
public Context getContext() {
return context;
}
Not entirely sure what you’re looking for, but you can do this with PropertyDescriptors.
November 24th, 2007