Skip to content

Commit e9e6bfa

Browse files
klueverError Prone Team
authored andcommitted
PUBLIC: Add a note about getting the end position of a tree to ASTHelpers.getStartPosition(Tree).
PiperOrigin-RevId: 941070251
1 parent b4d13a0 commit e9e6bfa

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,10 @@ private static ImmutableList<Type> extractTypes(@Nullable Type type) {
19411941
}
19421942
}
19431943

1944-
/** Returns the start position of the node. */
1944+
/**
1945+
* Returns the start position of the node. To get the end position of a node, use {@link
1946+
* VisitorState#getEndPosition}.
1947+
*/
19451948
public static int getStartPosition(Tree tree) {
19461949
return ((JCTree) tree).getStartPosition();
19471950
}

0 commit comments

Comments
 (0)