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 Space
static Space
firstPrefix
(@Nullable List<? extends J> trees) static Space
formatFirstPrefix
(List<J2> trees, Space prefix) static <J2 extends J>
List<JRightPadded<J2>>formatLastSuffix
(@Nullable List<JRightPadded<J2>> trees, Space suffix) boolean
isEmpty()
toString()
withComments
(List<Comment> comments) withWhitespace
(String whitespace)
-
Field Details
-
EMPTY
-
-
Method Details
-
build
-
getIndent
-
getLastWhitespace
-
getComments
-
getWhitespace
-
withComments
-
withWhitespace
-
isEmpty
public boolean isEmpty() -
firstPrefix
-
format
-
formatLastSuffix
public static <J2 extends J> List<JRightPadded<J2>> formatLastSuffix(@Nullable @Nullable List<JRightPadded<J2>> trees, Space suffix) -
formatFirstPrefix
-
toString
-