[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] due to interface not advised
|
- From: Andy Clement <andrew.clement@xxxxxxxxx>
- Date: Tue, 12 May 2009 09:21:31 -0700
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=aXTIEJ1yBS7odiGb5a8dtN41dqrw2Ke1ac6BUcWNDCc=; b=Au5H7MKaDGwRoMckaeC03qme1wFS6ygpC7i/KVyQOHb+TK1nzuqEio6m+q+OuMz+6C 3IjwgsngxVnrEjDRCJa7zFbiO+AWDCKkwrdx2lgEprzlUFTvJm+0KN5OnUJzAFGToo7A E2xI8VAvuoOwktMo0AHaTVjlI7Ceg7dOPm1sw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=lI+7Wq6ktRVRi+M9qJPr1v/A8ecgf4+U3aplgzXsaMZs3MPhMnFfyNCCPUfp9g+Jcr AT4p0ZYSsIT1IwqSib5dCEIN2Vxx6mSudh91aJdkik5m0G4M9B/f/5tyTMWrg8bUvwch 3vTKDXW4ADG06F9hVE6zD4ot+C/+fn8pkyj/k=
Hi Michael,
i dont quite follow - can you flesh out the example? I just wrote:
---A.java---
interface Context {}
class ContextImpl implements Context {}
aspect X {
pointcut selectSingletons(): execution(* d*(..));
after(Context con): selectSingletons() && this(con) {
}
}
class A {
Context doSomething() { return null; }
ContextImpl doSomethingElse() { return null; }
}
----
ajc -showWeaveInfo A.java
Join point 'method-execution(Context A.doSomething())' in Type 'A'
(A.java:11) advised by after advice from 'X' (A.java:6) [with runtime
test]
Join point 'method-execution(ContextImpl A.doSomethingElse())' in Type
'A' (A.java:12) advised by after advice from 'X' (A.java:6) [with
runtime test]
What is different between what I did and what you are saying?
Andy.
2009/5/12 Michael Rogger <Michael.Rogger@xxxxxxx>:
> Hi,
>
> I have for example this aspect:
>
> after( Context con ) : selectSingletons() && this(con){
> ...
> }
>
> Where Context is an interface.
>
> -If a method has as return type Context (infterface) it will be advised
> by aspectj.
> -If a method has as return type Context (class which implements
> interface) it will not be advised
>
> In theory this should work, any ideas?
>
> thanks
>
> --
> Michael Rogger
> STI Innsbruck (www.sti-innsbruck.at)
> University of Innsbruck
> ICT Technologiepark
> Technikerstr. 21a
> 6020 Innsbruck, Austria
>
> T +43 512 507 96844
> F +43 512 507 9872
> E michael.rogger@xxxxxxx
>
> Skype michael.rogger.work
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>