diff --git a/JavassistTest/src/finalLocal/Main.java b/JavassistTest/src/finalLocal/Main.java new file mode 100644 index 0000000..5afdc64 --- /dev/null +++ b/JavassistTest/src/finalLocal/Main.java @@ -0,0 +1,32 @@ +package finalLocal; + +public class Main { + + /** + * @param args + */ + public static void main(String[] args) { + Main m = new Main(); + m.coordinator(); + } + + static class A { + int get() { + return 2; + } + } + + public void coordinator() { + final A a = new A(); + class Test { + private A a2; + + public void test() { + a2 = a; + System.out.println(a2.get()); + } + } + Test t = new Test(); + t.test(); + } +}