void () { assertNull(createElement("").getJvmPsiType()); assertNotNull(createElement("<a>int</a>").getJvmPsiType()); final PsiClassType string = PsiType.getJavaLangString(getPsiManager(), GlobalSearchScope.allScope(getProject())); final PsiType psiType = createElement("<a>java.lang.String</a>").getJvmPsiType(); assertEquals(CommonClassNames.JAVA_LANG_STRING, assertInstanceOf(psiType, PsiClassType.class).getCanonicalText()); final PsiArrayType intArray = assertInstanceOf(createElement("<a>[I</a>").getJvmPsiType(), PsiArrayType.class); final PsiArrayType stringArray = assertInstanceOf(createElement("<a>[Ljava.lang.String;</a>").getJvmPsiType(), PsiArrayType.class); assertSame(PsiTypes.intType(), intArray.getComponentType()); assertEquals(CommonClassNames.JAVA_LANG_STRING, assertInstanceOf(stringArray.getComponentType(), PsiClassType.class).getCanonicalText()); assertJvmPsiTypeToString(intArray, "[I"); assertJvmPsiTypeToString(stringArray, "[Ljava.lang.String;"); assertJvmPsiTypeToString(string, "java.lang.String"); }