@@ -0,0 +1,17 @@ | |||
import java.lang.annotation.*; | |||
aspect X { | |||
declare warning: @Anno *: "Nothing should be annotated Anno!"; | |||
} | |||
@Anno | |||
class C { | |||
} | |||
class D { | |||
} | |||
@Retention(RetentionPolicy.RUNTIME) | |||
@interface Anno {} |
@@ -0,0 +1,15 @@ | |||
import java.lang.annotation.*; | |||
aspect X { | |||
declare error: I+ && !hasmethod(* foo(..)): "Missing foo() method in I subtype"; | |||
} | |||
interface I {} | |||
class C implements I { | |||
void foo() {} | |||
} | |||
class D implements I { | |||
} |
@@ -0,0 +1,15 @@ | |||
import java.lang.annotation.*; | |||
aspect X { | |||
declare warning: I+ && !hasmethod(* foo(..)): "Missing foo() method in I subtype"; | |||
} | |||
interface I {} | |||
class C implements I { | |||
void foo() {} | |||
} | |||
class D implements I { | |||
} |