Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

HasMethod.aj 332B

12345678910111213141516171819
  1. public aspect HasMethod {
  2. declare parents : hasmethod(* print(..)) implements Printable;
  3. public static void main(String[] args) {
  4. C c = new C();
  5. if (! (c instanceof Printable)) {
  6. throw new RuntimeException("declare parents : hasmethod failed");
  7. }
  8. }
  9. }
  10. class C {
  11. public void print() {}
  12. }
  13. interface Printable {};