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

質問の意味がよく分かっていないけど、これもなのかな?
---------- Forwarded message ----------
From: Jeppe Cramon <jeppe@xxxxxxxxx>
Date: 2006/01/12 3:32
Subject: [aspectj-users] How to declare an error when implementations
of an interface doesn't supply a certain constructor
To: AspectJ Users <aspectj-users@xxxxxxxxxxx>


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