Skip to main content

[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:
Sent from the AspectJ - users mailing list archive at

Back to the top