PsiPrimitiveType (String typeText) { for (final PsiPrimitiveType primitive : PRIMITIVES) { if (PsiTypes.voidType().equals(primitive)) { return primitive; } if (primitive.getCanonicalText().equals(typeText)) { return primitive; } } assert false : "Unknown primitive type"; return null; }