Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Introduction on more than just one class

Hi,

I want to introduce a method on more than one class - is there a way to do
this?

Sample code (this is what I can do now):

--------------------- 8< --------------------------
public aspect FooAspect {
  public void Foo1.bar() {
    System.out.println("An introduced method");
  }
}

public class Foo1 {
}
--------------------- >8 --------------------------

Sample code (what I would like to do):

--------------------- 8< --------------------------
public aspect FooAspect {
  public void [Foo1, Foo2, Foo3].bar() {
    System.out.println("An introduced method");
  }
}

public class Foo1 {
}

public class Foo2 {
}

public class Foo3 {
}
--------------------- >8 --------------------------

TIA,
Peter


Back to the top