mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-28 17:57:06 +02:00
23 lines
487 B
Plaintext
23 lines
487 B
Plaintext
![]() |
package hello;
|
||
|
|
||
|
public aspect World {
|
||
|
pointcut greeting():
|
||
|
execution(* Hello.sayHello(..));
|
||
|
after() returning: greeting() {
|
||
|
System.out.println(" World!");
|
||
|
}
|
||
|
|
||
|
String.new(Hello c) {
|
||
|
this(h.sayHell());
|
||
|
}
|
||
|
|
||
|
private static void main(String[] args) {
|
||
|
String s = new String(new Hello());
|
||
|
Stystems.substring(0);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
class Hello {
|
||
|
public void sayHell() {}
|
||
|
}
|