[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[aspectj-users] Combination of Class Annotation and Method Annotation matching
|
- From: "Takao Nakaguchi" <takao-n@xxxxxxxxxxxxxxx>
- Date: Thu, 10 Aug 2006 16:22:50 +0900
- Delivered-to: aspectj-users@eclipse.org
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=Hq5hsS50QVgN4B0NuEZ1GG3JaXNMNw8DZOaAuNEeS7wPKr2+jcHvFuonb1Lx8hwCDCOxDtgE9BgKgsbg1F9TRcAsdfdEt/nGAvVN6LlpevTbMdAM+dkMDYcekHTITnh81csE/82ZCCzMAFdOI3fodMABZjLV0qLTyNQGE9RXeSQ=
Hi.
I have a question about annotation matching.
Here is my test code.
-----
public aspect TestAspect {
declare warning : execution(@Annot * (@Annot *).*(..)) : "ok!";
declare warning : execution(@Annot * (!@Annot *).*(..)) : "ng!";
}
@interface Annot{};
class Base{
void func(){}
}
@Annot
class Derived extends Base{
// ok! and ng!
@Annot
void func(){}
}
class NoAnnotClass{
// ng!
@Annot
void func(){}
}
-----
See the message of Derived.func2. This method seems to be affected by
two inconsistent "declare warning" of TestAspect.
Is that correct behavior? If so, how can I write a pointcut matching for
NoAnnotClass.func and not matching for Derived.func?
I'm using AJDT1.4.0(AspectJ1.5.2)
best regards.
takao.