Here we are able to get the method name as a string.What if i want to get the currently exceuting method as a 'Method' object? so that i can use it to get the annotations associated with that method using getAnnotations().
Posted by PBR at March 9, 2006 11:11 PMThanks for comments PBR. Just from the top of my head, it'd be something like this:
Class params[] = {};
Class executingClass = Class.forName(elements[1].getClassName() );
Method executingMethod = executingClass.getDeclaredMethod(elements[1].getMethodName(), params);