Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Please help us to check if all our public methods call a known method or not, at compile-time

Am Mittwoch, 7. April 2004 12:33 schrieb Aimé KASSA:
> How to specify a pointcut allowing us to detect the
> absence of a call to MyClass.mandatoryMethod(..)
> inside all public methods (at compile-time)?
IMHO what you are trying to do is impossible: AspectJ - as all AOP 
implementations - works with a joinpoint model. Joinpoints are distinct 
points in the execution model of a program. Some of them can be picked out at 
compile time. However, what you are trying to say is "match on any joinpoints 
that match a certain pattern and are missing". The last part is your problem. 
You can only match on joinpoints that are contained but not on joinpoints 
that are missing.

Eric

-- 
Eric Bodden
Chair 2 for Computer Science
RWTH Aachen University, Germany



Back to the top