[jboss-user] [JBoss AOP Users] - Re: PLEASE answer me I really need your help

flavia.rainone@jboss.com do-not-reply at jboss.com
Fri Oct 2 08:33:09 EDT 2009

The point is that you are trying to achieve something with a framework that you used to do with a language extension.
Given AspectJ is a language extension of Java, its compiler would know to recognize that Initiateur now implements InitiateurI. JBoss AOP is not an extension of Java, it is a framework. Hence you have to use javac standard compiler to compile your code;  javac won't recognize that after compiling you are going to use a tool that makes Initiateur implemnt InitiateurI. So, you have to use a casting:

  | ...
  | if (i==1){memento1= Initiateur1Memento.createMementoFor((InitiateurI) initiateur);}
  | ...
  | Initiateur1Memento.setMemento((InitiateurI) initiateur, memento1);
  | ...

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258401#4258401

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4258401

More information about the jboss-user mailing list