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.

NewAnonymous.java 445B

123456789101112131415161718192021222324
  1. import org.aspectj.testing.Tester;
  2. public class NewAnonymous {
  3. public static void main(String[] args) {
  4. }
  5. }
  6. class C {
  7. private String f = "fC";
  8. public void m(final String s) {
  9. new Runnable() {
  10. public void run() {
  11. System.out.println(s+":"+f);
  12. }
  13. }.run();
  14. }
  15. }
  16. aspect A {
  17. before(): call(*.new()) {
  18. System.out.println("new Runnable");
  19. }
  20. }