You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HasField.aj 317B

12345678910111213141516171819
  1. public aspect HasField {
  2. declare parents : hasfield(* printer) 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 : hasfield failed");
  7. }
  8. }
  9. }
  10. class C {
  11. int printer;
  12. }
  13. interface Printable {};