docs: private Description checkToString(ExpressionTree tree, VisitorState state) {
      Symbol sym = ASTHelpers.getSymbol(tree);
      if (!(sym instanceof VarSymbol || sym instanceof MethodSymbol)) {
        return NO_MATCH;
      }
      Type type = ASTHelpers.getType(tree);
      if (type instanceof MethodType) {
        type = type.getReturnType();
      }
      Tree parent = state.getPath().getParentPath().getLeaf();
      ToStringKind toStringKind = isToString(parent, tree, state);
      if (toStringKind == ToStringKind.NONE) {
        return NO_MATCH;
      }
      if (!typePredicate().apply(type, state)) {
        return NO_MATCH;
      }
      Optional<Fix> fix;
      switch (toStringKind) {
        case IMPLICIT:
          fix = implicitToStringFix(tree, state);
          break;
        case EXPLICIT:
          fix = toStringFix(parent, tree, state);
          break;
        default:
          throw new AssertionError(toStringKind);
      }
      return maybeFix(tree, state, type, fix);
    }