/** * Matt Mastrangelo * COM1205 Honors Adjunct Assignment 1 * October 1, 2002 */ import java.lang.*; public aspect MethodCallDetector { pointcut detectPoint(): call(* *(..)) && !within(MethodCallDetector); after(): detectPoint() { Object thisObject = thisJoinPoint.getThis(); Object targetObject = thisJoinPoint.getTarget(); if ((thisObject != null) && (targetObject != null)) if (thisObject.equals(targetObject)) System.out.println(JPUtil.toString(thisJoinPoint)); } }