PsiType (@NotNull PsiClassType classType) { final PsiClass resolved = classType.resolve(); if (resolved != null && CommonClassNames.JAVA_UTIL_OPTIONAL.equals(resolved.getQualifiedName())) { if (classType.getParameterCount() == 1) { return classType.getParameters()[0]; } } return null; }