package first.aspect; public aspect Test { public static String methodName = ""; public void setMethodName(String method) { System.out.println("Current Method Name: " + Test.methodName); this.methodName = method; } public String getMethodName() { return this.methodName; } public Test() { System.out.println("Constructor: Test"); } //pointcut callPrint() : execution ( * weblogic..*.*(..) ); pointcut callWLServlet() : execution ( * weblogic.servlet..*.*(..) ); pointcut callServlet() : execution ( * javax.servlet..*.*(..) ); //pointcut callWLJsp() : execution ( * weblogic.servlet..*.*(..) ); //pointcut callJsp() : execution ( * javax.servlet..*.*(..) ); pointcut excludeInternal() : execution ( * weblogic.management.internal..*.*(..) ); pointcut excludeTools() : execution ( * weblogic.management.tools..*.*(..) ); pointcut excludeInfo() : execution ( * weblogic.management.info..*.*(..) ); before() : ( //callPrint() && callServlet() && callWLServlet() && ( ! excludeInternal() ) && ( ! excludeTools() ) && ( ! excludeInfo() ) ) { if ( methodName.equals( thisJoinPoint.getSignature().getName() ) ) { System.out.println("---------> Matched call: " + methodName ); } else { System.out.println("========> Method call: " + thisJoinPoint.getSignature().getName() + " <========="); } } }