core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ImmutableChecker.java
private Description checkSubtype(ClassTree tree, VisitorState state) {
    ClassSymbol sym = getSymbol(tree);
    Type superType = immutableSupertype(sym, state);
    if (superType == null) {
      return NO_MATCH;
    }
    String message =
        format("Class extends @Immutable type %s, but is not annotated as immutable", superType);
    Fix fix =
        SuggestedFix.builder()
            .prefixWith(tree, "@Immutable ")
            .addImport(Immutable.class.getName())
            .build();
    return buildDescription(tree).setMessage(message).addFix(fix).build();
  }
/** Check for classes without {@code @Immutable} that have immutable supertypes. */
Check for classes without   that have immutable supertypes.
Check for classes without that have immutable supertypes .
private Description checkSubtype(ClassTree tree, VisitorState state) {
    ClassSymbol sym = getSymbol(tree);
    Type superType = immutableSupertype(sym, state);
    if (superType == null) {
      return NO_MATCH;
    }
    String message =
        format("Class extends @Immutable type %s, but is not annotated as immutable", superType);
    Fix fix =
        SuggestedFix.builder()
            .prefixWith(tree, "@Immutable ")
            .addImport(Immutable.class.getName())
            .build();
    return buildDescription(tree).setMessage(message).addFix(fix).build();
  }
private Description checkSubtype ( ClassTree tree , VisitorState state ) { ClassSymbol sym = getSymbol ( tree ) ; Type superType = immutableSupertype ( sym , state ) ; if ( superType == null ) { return NO_MATCH ; } String message = format ( "Class extends @Immutable type %s, but is not annotated as immutable" , superType ) ; Fix fix = SuggestedFix . builder ( ) . prefixWith ( tree , "@Immutable " ) . addImport ( Immutable . class . getName ( ) ) . build ( ) ; return buildDescription ( tree ) . setMessage ( message ) . addFix ( fix ) . build ( ) ; }
Check for classes without {@code @Immutable} that have immutable supertypes.
Check for classes without { @code @Immutable } that have immutable supertypes .