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