Package org.openrewrite.java.tree
Class Space
java.lang.Object
org.openrewrite.java.tree.Space
Wherever whitespace can occur in Java, so can comments (at least block and javadoc style comments).
So whitespace and comments are like peanut butter and jelly.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Spacestatic SpacefirstPrefix(@Nullable List<? extends org.openrewrite.java.tree.J> trees) static Spacestatic Spacestatic <J2 extends org.openrewrite.java.tree.J>
List<J2>formatFirstPrefix(List<J2> trees, Space prefix) static <J2 extends org.openrewrite.java.tree.J>
@Nullable List<JRightPadded<J2>>formatLastSuffix(@Nullable List<JRightPadded<J2>> trees, Space suffix) booleanisEmpty()toString()withComments(List<Comment> comments) withWhitespace(String whitespace)
-
Field Details
-
EMPTY
-
SINGLE_SPACE
-
-
Method Details
-
build
-
getIndent
-
getLastWhitespace
-
getComments
-
getWhitespace
-
withComments
-
withWhitespace
-
isEmpty
public boolean isEmpty() -
firstPrefix
-
format
-
format
-
formatLastSuffix
public static <J2 extends org.openrewrite.java.tree.J> @Nullable List<JRightPadded<J2>> formatLastSuffix(@Nullable List<JRightPadded<J2>> trees, Space suffix) -
formatFirstPrefix
-
toString
-