void () { doTest(""" package p;class A implements I, J<I> { } class B<K, V extends X> extends a/*skip*/.A { class I { } } @java.lang.Deprecated interface I { } /** @deprecated just don't use */ @interface N { } /** {@code @deprecated}? nope. */ class X { }""", """ PsiJavaFileStub [p] IMPORT_LIST:PsiImportListStub CLASS:PsiClassStub[name=A fqn=p.A] MODIFIER_LIST:PsiModifierListStub[mask=0] TYPE_PARAMETER_LIST:PsiTypeParameterListStub EXTENDS_LIST:PsiRefListStub[EXTENDS_LIST:] IMPLEMENTS_LIST:PsiRefListStub[IMPLEMENTS_LIST:I, J<I>] CLASS:PsiClassStub[name=B fqn=p.B] MODIFIER_LIST:PsiModifierListStub[mask=0] TYPE_PARAMETER_LIST:PsiTypeParameterListStub TYPE_PARAMETER:PsiTypeParameter[K] EXTENDS_BOUND_LIST:PsiRefListStub[EXTENDS_BOUNDS_LIST:] TYPE_PARAMETER:PsiTypeParameter[V] EXTENDS_BOUND_LIST:PsiRefListStub[EXTENDS_BOUNDS_LIST:X] EXTENDS_LIST:PsiRefListStub[EXTENDS_LIST:a/*skip*/.A] IMPLEMENTS_LIST:PsiRefListStub[IMPLEMENTS_LIST:] CLASS:PsiClassStub[name=I fqn=p.B.I] MODIFIER_LIST:PsiModifierListStub[mask=0] TYPE_PARAMETER_LIST:PsiTypeParameterListStub EXTENDS_LIST:PsiRefListStub[EXTENDS_LIST:] IMPLEMENTS_LIST:PsiRefListStub[IMPLEMENTS_LIST:] CLASS:PsiClassStub[interface deprecatedA name=I fqn=p.I] MODIFIER_LIST:PsiModifierListStub[mask=0] ANNOTATION:PsiAnnotationStub[@java.lang.Deprecated] ANNOTATION_PARAMETER_LIST:PsiAnnotationParameterListStubImpl TYPE_PARAMETER_LIST:PsiTypeParameterListStub EXTENDS_LIST:PsiRefListStub[EXTENDS_LIST:] IMPLEMENTS_LIST:PsiRefListStub[IMPLEMENTS_LIST:] CLASS:PsiClassStub[interface annotation deprecated name=N fqn=p.N] MODIFIER_LIST:PsiModifierListStub[mask=0] TYPE_PARAMETER_LIST:PsiTypeParameterListStub EXTENDS_LIST:PsiRefListStub[EXTENDS_LIST:] IMPLEMENTS_LIST:PsiRefListStub[IMPLEMENTS_LIST:] CLASS:PsiClassStub[name=X fqn=p.X] MODIFIER_LIST:PsiModifierListStub[mask=0] TYPE_PARAMETER_LIST:PsiTypeParameterListStub EXTENDS_LIST:PsiRefListStub[EXTENDS_LIST:] IMPLEMENTS_LIST:PsiRefListStub[IMPLEMENTS_LIST:] """); }