diff options
Diffstat (limited to 'javaparser-symbol-solver-testing/src/test/resources/AnonymousClassDeclarations.java.txt')
-rw-r--r-- | javaparser-symbol-solver-testing/src/test/resources/AnonymousClassDeclarations.java.txt | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/javaparser-symbol-solver-testing/src/test/resources/AnonymousClassDeclarations.java.txt b/javaparser-symbol-solver-testing/src/test/resources/AnonymousClassDeclarations.java.txt new file mode 100644 index 000000000..f994225bc --- /dev/null +++ b/javaparser-symbol-solver-testing/src/test/resources/AnonymousClassDeclarations.java.txt @@ -0,0 +1,71 @@ +class AnonymousClassDeclarations { + + static class DoFn<I,O> { + static class ProcessContext { + public Long innerClassMethod() {} + } + + enum MyEnum { + E1, E2, E3 + } + + public void process(ProcessContext context) {} + } + + static class Transform<I,O> {} + + static class ParDo { + static <I,O> Transform<I,O> of(DoFn<I,O> doFn) { + return null; + } + } + + void fooBar1() { + ParDo.of(new DoFn<Integer,Long>() {}); + } + + void fooBar2() { + ParDo.of(new DoFn<Integer,Long>() { + public void process(ProcessContext c){ + return c.innerClassMethod(); + } + }); + } + + void fooBar3() { + ParDo.of(new DoFn<Integer,Long>() { + + void callAnnonClassInnerMethod() {} + + public void process(ProcessContext c) { + callAnnonClassInnerMethod(); + } + }); + } + + void fooBar4() { + ParDo.of(new DoFn<Integer,Long>() { + + void callAnnonClassInnerMethod() {} + + public void process(ProcessContext c) { + MyEnum.E3.toString(); + } + }); + } + + void fooBar5() { + ParDo.of(new DoFn<Integer,Long>() { + + void callAnnonClassInnerMethod() {} + + enum MyInnerEnum { + E1, E2, E3 + } + public void process(ProcessContext c) { + MyInnerEnum.E3.toString(); + } + }); + } + +} |