1 8 package methodresolver.p1; 9 10 16 public class TypeForTraverser { 17 18 public static void doit() { 19 } 20 21 23 static class InnerA { 24 public void test() { 25 new Runnable () { 26 public void run() { 27 doit(); 28 } 29 }; 30 } 31 } 32 33 35 static { 36 new Runnable () { 37 class InnerB { 38 public void test() { 39 doit(); 40 } 41 } 42 43 public void run() { 44 new InnerB().test(); 45 } 46 }.run(); 47 } 48 49 51 static { 52 new Runnable () { 53 class InnerC { 54 public void test() { 55 doit(); 56 } 57 } 58 59 public void run() { 60 new InnerC().test(); 61 } 62 }.run(); 63 } 64 65 67 public Object member1 = new Runnable () { 68 public void run() { 69 doit(); 70 } 71 }; 72 73 75 public void test() { 76 Runnable r = new Runnable () { 77 public void run() { 78 doit(); 79 } 80 }; 81 r.run(); 82 }; 83 84 public static void main(String [] args) { 85 86 } 87 88 } 89 | Popular Tags |