boolean (@NotNull PsiClass aClass, boolean checkDocComment) { if (aClass.isRecord()) { return true; } final String qualifiedName = aClass.getQualifiedName(); if (qualifiedName != null && (immutableTypes.contains(qualifiedName) || (qualifiedName.startsWith("com.google.common.collect.Immutable") && !qualifiedName.endsWith("Builder")))) { return true; } if (JCiPUtil.isImmutable(aClass, checkDocComment)) { return true; } return aClass.hasModifierProperty(PsiModifier.FINAL) && ContainerUtil.and(aClass.getAllFields(), field -> !field.hasModifierProperty(PsiModifier.STATIC) && field.hasModifierProperty(PsiModifier.FINAL) && (TypeConversionUtil.isPrimitiveAndNotNull(field.getType()) || immutableTypes.contains(field.getType().getCanonicalText()))); }