类 JavaOutput


public final class JavaOutput extends Output
JavaOutput extends Output to represent a Java output document. It includes methods to emit the output document.
  • 构造器详细资料

    • JavaOutput

      public JavaOutput(JavaInput javaInput, InputMetadata inputMetadata)
      JavaOutput constructor.
      参数:
      javaInput - the JavaInput, used to match up blank lines in the output
  • 方法详细资料

    • append

      public void append(State state, String text, com.google.common.collect.Range<Integer> range)
      从类复制的说明: Output
      Output a string.
      指定者:
      append 在类中 Output
      参数:
      state - the current state
      text - the string
      range - the Range corresponding to the string
    • indent

      public void indent(int indent)
      从类复制的说明: Output
      Indent by outputting indent spaces.
      指定者:
      indent 在类中 Output
      参数:
      indent - the current indent
    • getFormatReplacements

      public com.google.common.collect.ImmutableList<com.palantir.javaformat.java.Replacement> getFormatReplacements(com.google.common.collect.RangeSet<Integer> iRangeSet0)
      Emit a list of Replacements to convert from input to output.
      返回:
      a list of Replacements, sorted by start index, without overlaps
    • startPosition

      public static int startPosition(Input.Token token)
      The earliest position of any Tok in the Token, including leading whitespace.
    • startTok

      public static Input.Tok startTok(Input.Token token)
      The earliest non-whitespace Tok in the Token.
    • endTok

      public static Input.Tok endTok(Input.Token token)
      The last non-whitespace Tok in the Token.
    • toString

      public String toString()
      覆盖:
      toString 在类中 Output