code: public boolean isImmutable(Class<?> clazz) {
       
          if (clazz.isPrimitive() || clazz.isEnum()) {
              return false;
          }
          if (clazz.isArray()) {
              return false;
          }
           
          final IsImmutable isImmutable;
          if (DETECTED_IMMUTABLE_CLASSES.containsKey(clazz)) {
              isImmutable = DETECTED_IMMUTABLE_CLASSES.get(clazz);
          } else {
              Dotted dottedClassName = Dotted.fromClass(clazz);
              isImmutable = ANALYSIS_SESSION.get().resultFor(dottedClassName).isImmutable;
              DETECTED_IMMUTABLE_CLASSES.put(clazz, isImmutable);
          }
  
          if (isImmutable.equals(IsImmutable.IMMUTABLE) || isImmutable.equals(IsImmutable.EFFECTIVELY_IMMUTABLE)) {
              return true;
          } else {
              return false;
          }
      }
docs: Return true if immutable or effectively immutable
  @param clazz Class under test
  @return True if immutable or effectively immutable