MCPcopy Index your code
hub / github.com/google/google-java-format / Tok

Interface Tok

core/src/main/java/com/google/googlejavaformat/Input.java:29–74  ·  view source on GitHub ↗

A Tok ("tock") is a token, or a comment, or a newline, or a maximal string of blanks. A token Tok underlies a Token, and each other Tok is attached to a single Token. Tokens and comments have indices; white space Toks do not.

Source from the content-addressed store, hash-verified

27 * {@code Token}. Tokens and comments have indices; white space {@code Tok}s do not.
28 */
29 public interface Tok {
30 /**
31 * Return the {@code Tok}'s index.
32 *
33 * @return its index
34 */
35 int getIndex();
36
37 /**
38 * Return the {@code Tok}'s {@code 0}-based position.
39 *
40 * @return its position
41 */
42 int getPosition();
43
44 /**
45 * Return the {@code Tok}'s {@code 0}-based column number.
46 *
47 * @return its column number
48 */
49 int getColumn();
50
51 /** The {@code Tok}'s text. */
52 String getText();
53
54 /** The {@code Tok}'s original text (before processing escapes). */
55 String getOriginalText();
56
57 /** The length of the {@code Tok}'s original text. */
58 int length();
59
60 /** Is the {@code Tok} a newline? */
61 boolean isNewline();
62
63 /** Is the {@code Tok} a "//" comment? */
64 boolean isSlashSlashComment();
65
66 /** Is the {@code Tok} a "/*" comment? */
67 boolean isSlashStarComment();
68
69 /** Is the {@code Tok} a javadoc comment? */
70 boolean isJavadocComment();
71
72 /** Is the {@code Tok} a comment? */
73 boolean isComment();
74 }
75
76 /** A {@code Token} is a language-level token. */
77 public interface Token {

Callers 61

computeRangeMethod · 0.65
computeRangeMethod · 0.65
getIMethod · 0.65
buildMethod · 0.65
computeRangesMethod · 0.65
markForPartialFormatMethod · 0.65
getFormatReplacementsMethod · 0.65
startTokMethod · 0.65
actualSizeMethod · 0.65
actualStartColumnMethod · 0.65
syncMethod · 0.65
drainMethod · 0.65

Implementers 1

Tokcore/src/main/java/com/google/googleja

Calls

no outgoing calls

Tested by

no test coverage detected