Class SourceCode
java.lang.Object
tech.picnic.errorprone.bugpatterns.util.SourceCode
A collection of Error Prone utility methods for dealing with the source code representation of
AST nodes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringtreeToString(Tree tree, com.google.errorprone.VisitorState state) Returns a string representation of the givenTree, preferring the original source code (if available) over its prettified representation.
-
Method Details
-
treeToString
Returns a string representation of the givenTree, preferring the original source code (if available) over its prettified representation.- Parameters:
tree- The AST node of interest.state- AVisitorStatedescribing the context in which the givenTreeis found.- Returns:
- A non-
nullstring.
-