Is it somehow possible to mix introductions and $instanceof{...}?
Specifically, if I have a class called "Address" and I do 2 things to it:
1. Introduce an interface, "ITrackedObject".
2. Capture all calls of all methods to $instanceof{ITrackedObject}->*(..).
Since #2 is woven into the class at the same time as #1, the target class,
Address in this case, does not yet implement ITrackedObject so #2 will not be
applied.
Seems like the only way to make this happen is to weave the class twice. First
performing the introduction and second applying the weaving for method calls.
HOWEVER, this works for set(...), so it makes me think this is a bug.
I looked at defining precedence but it does not apply to introductions, just
(apparently from reading the docs only) interceptors and advice, so it seems I
cannot get this combination to work.
I could use a marker interface instead or maybe select by package instead of by
type. I don't like either option but short of doing that or not using the
introduction, it seems I cannot use $instanceof{...}
Any suggestions?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3940693#3940693
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3940693
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user