Hi Adriano. I don't think this is possible with AspectJ right now, the primary reason being that there's no way to distinguish subtyping as in implementing an interface from subtyping as extending a class.
SCoPE may do the job though: http://www.graco.c.u-tokyo.ac.jp/ppp/index.php?Projects%2Fscope Eric 2008/5/20 Adriano Tavares <[EMAIL PROTECTED]>: > > 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() : > within(com.acme.spec..*); > > 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. > > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > -- Eric Bodden Sable Research Group McGill University, Montréal, Canada _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
