| [ews.eclipse.technology.aspectj] Re: Newbie help with @target and declare |
Hi,
I'd like to declare an error when someone calls the constructor on specific objects. There is a nice example in the Quick Ref that say that you do like this:
declare error: call(Singleton.new(..)) : "Bad"
But what if I whant this behavour on classes with a specific annotation? I tried:
declare error: call(*.new(..)) && @target(MyAnnotation)
but the compiler say that @target cannot be used in a declare statement. Any suggestions anyone?
Thanks
declare error: call( (@MyAnnotation *).new(..) ) : "Bad"