[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] pointcut isInterface()

Hi all,
I need define static aspect to enforce directory only with interfaces.
How to define a pointcut to enforce only interfaces?

public aspect EnforceInterface {

	pointcut inSpecificationDirectory() :

	pointcut isInterface() : <MUST BE INTERFACE> ; 
	declare error: inSpecificationDirectory() && !isInterface():
        "Only interfaces in 'com.acme.spec..*' directory.";

any idea?

Thanks in advance,
Adriano Tavares.
View this message in context: http://www.nabble.com/pointcut-isInterface%28%29-tp17348400p17348400.html
Sent from the AspectJ - users mailing list archive at Nabble.com.