Replace java comment with logging during or before execution

I am curious if it is possible to use annotation for a class or method that replaces comments when or before starting comments line comments. 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;
    }
}

translate 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;
    }
}
+5
source share
3 answers

Out of the box. No, there is nothing that could allow this.

, , - , . , , .

, - . , , , - . - , , , API.

+1

, , . , , javadoc . , javadoc.

0

?

, - ( final int ), . : / Android? Android.

0
source

All Articles