void () { PsiClass cls = getFile("../../mirror/pkg/TypeAnnotations").getClasses()[0]; PsiField f1 = cls.findFieldByName("f1", false); assertNotNull(f1); assertEquals("java.lang.@pkg.TypeAnnotations.TA(\"field type\") String", f1.getType().getCanonicalText(true)); PsiField f2 = cls.findFieldByName("f2", false); assertNotNull(f2); assertEquals("java.lang.@pkg.TypeAnnotations.MixA(\"field and type\") String", f2.getType().getCanonicalText(true)); PsiMethod m1 = cls.findMethodsByName("m1", false)[0]; assertEquals("@pkg.TypeAnnotations.TA(\"return type\") int", Objects.requireNonNull(m1.getReturnType()).getCanonicalText(true)); PsiParameter p1 = cls.findMethodsByName("m2", false)[0].getParameterList().getParameters()[0]; assertEquals("@pkg.TypeAnnotations.TA(\"parameter\") int", p1.getType().getCanonicalText(true)); }