Class AnnotationMirrorToString

All Implemented Interfaces:
BugChecker.BinaryTreeMatcher, BugChecker.CompoundAssignmentTreeMatcher, BugChecker.MethodInvocationTreeMatcher, Suppressible, Serializable

public class AnnotationMirrorToString extends AbstractToString
A BugChecker; see the associated BugPattern annotation for details.
See Also:
  • Method Details

    • typePredicate

      protected TypePredicate typePredicate()
      Description copied from class: AbstractToString
      The type to match on.
      Specified by:
      typePredicate in class AbstractToString
    • implicitToStringFix

      protected Optional<Fix> implicitToStringFix(com.sun.source.tree.ExpressionTree tree, VisitorState state)
      Description copied from class: AbstractToString
      Constructs a fix for an implicit toString call, e.g. from string concatenation or from passing an argument to println or StringBuilder.append.
      Specified by:
      implicitToStringFix in class AbstractToString
      Parameters:
      tree - the tree node for the expression being converted to a String
    • toStringFix

      protected Optional<Fix> toStringFix(com.sun.source.tree.Tree parent, com.sun.source.tree.ExpressionTree tree, VisitorState state)
      Description copied from class: AbstractToString
      Constructs a fix for an explicit toString call, e.g. from Object.toString() or String.valueOf().
      Specified by:
      toStringFix in class AbstractToString
      Parameters:
      parent - the expression's parent (e.g. String.valueOf(expression))