mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-15 02:13:50 +02:00
17 lines
260 B
Plaintext
17 lines
260 B
Plaintext
public aspect HasMethodViaITD {
|
|
|
|
declare parents : hasmethod(* foo()) implements I;
|
|
|
|
// C gets foo via ITD
|
|
public void C.foo() {}
|
|
|
|
declare warning : execution(* I+.bar()) : "hasmethod matched on ITD ok";
|
|
}
|
|
|
|
interface I {}
|
|
|
|
class C {
|
|
|
|
void bar() {}
|
|
|
|
} |