[jboss-user] [JBoss AOP Users] - method foo is the only one that can be executed??
souma
do-not-reply at jboss.com
Sun Oct 4 13:57:52 EDT 2009
Good morning
I do not understand why the example foo is the only one that can be executed ... if I change the names or parameters eclipse tells me an error!!! ..
package Essai;
|
| public class Foo {
| public int fooField;
|
| public Foo () {
| fooField = 0;
| }
|
| }
|
| package Essai;
|
| public class FooMixin implements FooMixinInt {
| public FooMixin(){}
|
| public String fooMethod2 (int i) {
| System.out.print("Message");
| return Integer.toString ( 4- i);
| }
|
| }
|
package Essai;
| public interface FooMixinInt {
| public String fooMethod2 (int i);
| }
package Essai;
|
| public class Main {
|
|
| public static void main(String[] args) {
|
| Foo foo = new Foo ();
| FooMixinInt fooint = (FooMixinInt) foo;
| String s = foo.fooMethod2(-2);
|
| }
|
| }
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
| <aop>
| <introduction class="Essai.Foo">
| <mixin>
| <interfaces>Essai.FooMixinInt</interfaces>
| <class>Essai.FooMixin</class>
| <construction>new Essai.FooMixin()</construction>
| </mixin>
| </introduction>
| </aop>
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258573#4258573
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4258573
More information about the jboss-user
mailing list