I'm curious if it's possible to use an annotation on a class or method that, during or before runtime, replaces comments with logging of the comment string. For example, if on android:
@LogComments
class MyActivity extends Activity {
@Override public void onCreate(Bundle b) {
super.onCreate(b);
// set some local vars
int a = 1;
int b = 2;
}
}
would translate to something like
class MyActivity extends Activity {
@Override public void onCreate(Bundle b) {
super.onCreate(b);
Log.d("TAG", "set some local vars");
int a = 1;
int b = 2;
}
}