Class Space

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

public class Space extends Object
Whitespace and comments in Dockerfile. Comments in Dockerfile start with # and continue to the end of the line.
  • Field Details

    • EMPTY

      public static final Space EMPTY
    • SINGLE_SPACE

      public static final Space SINGLE_SPACE
  • Method Details

    • build

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

      public String getIndent()
    • getLastWhitespace

      public String getLastWhitespace()
    • getWhitespace

      public String getWhitespace()
    • hasComment

      public boolean hasComment(String comment)
    • 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 Docker> trees)
    • format

      public static Space format(String formatting)
    • format

      public static Space format(String formatting, int beginIndex, int toIndex)
    • toString

      public String toString()
      Overrides:
      toString in class Object