views:

68

answers:

1

I don't know, so that you could throw a CircularReferenceException?

+1  A: 

You could probably use cflow to mark each method used in that call, and then just store the methods called in a static list in the aspect, to determine if you called the same method again, and depending on how often you call it, you could throw your exception.

I have never tried to do this, and this is just a guess, but it should work.

http://www.eclipse.org/aspectj/doc/released/progguide/language-joinPoints.html

James Black