|
59 | 59 | import org.jspecify.annotations.Nullable; |
60 | 60 |
|
61 | 61 | /** {@code JavaInput} extends {@link Input} to represent a Java input document. */ |
62 | | -public final class JavaInput extends Input { |
| 62 | +final class JavaInput extends Input { |
63 | 63 | /** |
64 | 64 | * A {@code JavaInput} is a sequence of {@link Tok}s that cover the Java input. A {@link Tok} is |
65 | 65 | * either a token (if {@code isToken()}), or a non-token, which is a comment (if {@code |
@@ -275,7 +275,7 @@ public String toString() { |
275 | 275 | * @param text the input text |
276 | 276 | * @throws FormatterException if the input cannot be parsed |
277 | 277 | */ |
278 | | - public JavaInput(String text) throws FormatterException { |
| 278 | + JavaInput(String text) throws FormatterException { |
279 | 279 | this.text = checkNotNull(text); |
280 | 280 | setLines(ImmutableList.copyOf(Newlines.lineIterator(text))); |
281 | 281 | ImmutableList<Tok> toks = buildToks(text); |
@@ -608,7 +608,7 @@ private static boolean isParamComment(Tok tok) { |
608 | 608 | * @return the {@code 0}-based {@link Range} of tokens |
609 | 609 | * @throws FormatterException if the upper endpoint of the range is outside the file |
610 | 610 | */ |
611 | | - Range<Integer> characterRangeToTokenRange(Range<Integer> characterRange) |
| 611 | + private Range<Integer> characterRangeToTokenRange(Range<Integer> characterRange) |
612 | 612 | throws FormatterException { |
613 | 613 | if (characterRange.upperEndpoint() > text.length()) { |
614 | 614 | throw new FormatterException( |
@@ -699,11 +699,11 @@ public int getColumnNumber(int inputPosition) { |
699 | 699 |
|
700 | 700 | // TODO(cushon): refactor JavaInput so the CompilationUnit can be passed into |
701 | 701 | // the constructor. |
702 | | - public void setCompilationUnit(JCCompilationUnit unit) { |
| 702 | + void setCompilationUnit(JCCompilationUnit unit) { |
703 | 703 | this.unit = unit; |
704 | 704 | } |
705 | 705 |
|
706 | | - public RangeSet<Integer> characterRangesToTokenRanges(Collection<Range<Integer>> characterRanges) |
| 706 | + RangeSet<Integer> characterRangesToTokenRanges(Collection<Range<Integer>> characterRanges) |
707 | 707 | throws FormatterException { |
708 | 708 | RangeSet<Integer> tokenRangeSet = TreeRangeSet.create(); |
709 | 709 | for (Range<Integer> characterRange : characterRanges) { |
|
0 commit comments