Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How to declare an error when implementations of an interface doesn't supply a certain constructor

My apologies to for my previous message, which is accidentally sent to
the entire list.  But I thought that the problem might be solved by
our extended AspectJ compiler (called SCoPE), which allows you to
write declarations by using if-pointcut like:
  declare error: staticinitialization(...) &&
if(thisJoinPoint.getSignature()....)

I'd like to send our solution again when we find the way to do it. 
More information on SCoPE can be found from the follwing address:
http://www.graco.c.u-tokyo.ac.jp/ppp/projects/scope/

Best regards,

Hidehiko

2006/1/12, Jeppe Cramon <jeppe@xxxxxxxxx>:
> Hi
>
> I'm trying to declare an error when implementations of a certain
> interface doesn't supply a certain constructor.
> I'm both having difficulty limiting the scope to only implementations of
> the interface (IOpen+) seems too large a granularity and specifying the
> constructor.
>
> I've tried with this aspect:
>
> public aspect OptionAspect {
>     declare error: staticinitialization(IOption+) &&
> !execution(IOption+.new(OptionType)) : "IOption implementations must
> provide a constructor which accepts an OptionType";
> }
>
> Could you give me a pointer to what I'm missing/doing wrong?
>
> Thanks in advance :)
>
> /Jeppe
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top