boolean (PsiField field) { PsiType type = field.getType().getDeepComponentType(); if (type instanceof PsiPrimitiveType) return true; if (!(type instanceof PsiClassType)) return false; PsiClass fieldClass = ((PsiClassType)type).resolve(); if (fieldClass == null) return true; if (fieldClass.isEnum()) return true; if (fieldClass.hasAnnotation(FileModifier.SafeTypeForPreview.class.getCanonicalName())) return true; String name = fieldClass.getQualifiedName(); return name != null && ALLOWED_FIELD_TYPES.contains(name); }