1 package com.puppycrawl.tools.checkstyle.grammar.antlr4; 2 3 import static java.lang.annotation.ElementType.TYPE_USE; 4 import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 6 import java.io.File; 7 import java.io.FileNotFoundException; 8 import java.io.FileOutputStream; 9 import java.lang.annotation.ElementType; 10 import java.lang.annotation.Retention; 11 import java.lang.annotation.Target; 12 import java.lang.ref.WeakReference; 13 import java.util.function.Function; 14 15 public class InputAntlr4AstRegressionUnusualAnnotation { 16 17 public class Inner<S> { 18 public Inner() {} 19 public <@A T> Inner(@B Object o) {} 20 public <@C T> Object g(Inner<@D S> this, Object @E [] o) { 21 return new @F int @G [5]; 22 } 23 } 24 25 public <@BL T extends @BO Inner<@BP Integer @BQ []>> 26 @BR Inner<@BS Inner<@BT String>> func4() { 27 return (@BU Inner<@BV Inner<@BW String>>) 28 new <@BX Inner<@BY Integer>> @BZ Inner<@CA Inner<@CB String>>(null); 29 } 30 31 class Test { 32 class InnerException extends Exception { } 33 void foo() throws @C Test.@C InnerException { } 34 } 35 36 @Target(ElementType.TYPE_USE) @interface C { } 37 } 38 39 @Retention(RUNTIME) @Target({TYPE_USE}) @interface A { } 40 @Retention(RUNTIME) @Target({TYPE_USE}) @interface B { } 41 @Retention(RUNTIME) @Target({TYPE_USE}) @interface C { } 42 @Retention(RUNTIME) @Target({TYPE_USE}) @interface D { } 43 @Retention(RUNTIME) @Target({TYPE_USE}) @interface E { } 44 @Retention(RUNTIME) @Target({TYPE_USE}) @interface F { } 45 @Retention(RUNTIME) @Target({TYPE_USE}) @interface G { } 46 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BL { } 47 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BM { } 48 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BN { } 49 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BO { } 50 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BP { } 51 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BQ { } 52 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BR { } 53 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BS { } 54 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BT { } 55 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BU { } 56 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BV { } 57 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BW { } 58 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BX { } 59 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BY { } 60 @Retention(RUNTIME) @Target({TYPE_USE}) @interface BZ { } 61 @Retention(RUNTIME) @Target({TYPE_USE}) @interface CA { } 62 @Retention(RUNTIME) @Target({TYPE_USE}) @interface CB { }