So idea is to write a code which would add some predefined code snippets
e.g. I want to
Generate class field
com.ck.MyClass.DEBUGGER
initialized asorg.apache.commons.logging.LogFactory.getLog("DEBUGGER." + MyClass.CNAME);
add these below lines at entry point and exit point of all methods except constructors in a class through java code for all the classes present in my project
final String methodName = "process()"; if (MyClass.DEBUGGER.isDebugEnabled()) { MyClass.DEBUGGER.debug(CommonLoggingConstants.METHOD_ENTRY + MyClass.CNAME + CommonLoggingConstants.HASH + methodName); }
What would be the best approach and API to address this requirement?