Package com.google.googlejavaformat.java
Class JavaInput.Token
java.lang.Object
com.google.googlejavaformat.java.JavaInput.Token
- All Implemented Interfaces:
Input.Token
- Enclosing class:
JavaInput
A
JavaInput.Token contains a token JavaInput.Tok and its associated non-tokens; each non-token
JavaInput.Tok belongs to one JavaInput.Token. Each JavaInput.Token has an immutable list of its
non-tokens that appear before it, and another list of its non-tokens that appear after it. The
concatenation of the texts of all the JavaInput.Tokens' JavaInput.Toks, each preceded by the texts
of its toksBefore and followed by the texts of its toksAfter, equals the input.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JavaInput.Tokprivate final com.google.common.collect.ImmutableList<JavaInput.Tok> private final com.google.common.collect.ImmutableList<JavaInput.Tok> -
Constructor Summary
ConstructorsConstructorDescriptionToken(List<JavaInput.Tok> toksBefore, JavaInput.Tok tok, List<JavaInput.Tok> toksAfter) Token constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetTok()Get the token'sJavaInput.Tok.com.google.common.collect.ImmutableList<? extends Input.Tok> Get the laterJavaInput.Toks assigned to thisToken.com.google.common.collect.ImmutableList<? extends Input.Tok> Get the earlierJavaInput.Toks assigned to thisToken.toString()
-
Field Details
-
tok
-
toksBefore
-
toksAfter
-
-
Constructor Details
-
Token
Token(List<JavaInput.Tok> toksBefore, JavaInput.Tok tok, List<JavaInput.Tok> toksAfter) Token constructor.- Parameters:
toksBefore- the earlier non-token {link Tok}s assigned to thisTokentok- this tokenJavaInput.ToktoksAfter- the later non-token {link Tok}s assigned to thisToken
-
-
Method Details
-
getTok
Get the token'sJavaInput.Tok.- Specified by:
getTokin interfaceInput.Token- Returns:
- the token's
JavaInput.Tok
-
getToksBefore
Get the earlierJavaInput.Toks assigned to thisToken.- Specified by:
getToksBeforein interfaceInput.Token- Returns:
- the earlier
JavaInput.Toks assigned to thisToken
-
getToksAfter
Get the laterJavaInput.Toks assigned to thisToken.- Specified by:
getToksAfterin interfaceInput.Token- Returns:
- the later
JavaInput.Toks assigned to thisToken
-
toString
-