Class Space

java.lang.Object
org.openrewrite.hcl.tree.Space

public class Space extends Object
Comments can occur wherever whitespace can. So whitespace and comments are like peanut butter and jelly.
  • Field Details

    • EMPTY

      public static final Space EMPTY
  • Method Details

    • build

      public static Space build(@Nullable String whitespace, List<Comment> comments)
    • getIndent

      public String getIndent()
    • getLastWhitespace

      public String getLastWhitespace()
    • withLastWhitespace

      public Space withLastWhitespace(String whitespace)
    • getWhitespace

      public String getWhitespace()
    • withComments

      public Space withComments(List<Comment> comments)
    • withWhitespace

      public Space withWhitespace(String whitespace)
    • isEmpty

      public boolean isEmpty()
    • firstPrefix

      public static Space firstPrefix(@Nullable List<? extends Hcl> trees)
    • format

      public static Space format(String formatting)
    • formatFirstPrefix

      public static <H extends Hcl> List<H> formatFirstPrefix(List<H> trees, Space prefix)
    • toString

      public String toString()
      Overrides:
      toString in class Object