Package org.openrewrite.java.refactor
Class JavaFormatter
- java.lang.Object
-
- org.openrewrite.refactor.Formatter
-
- org.openrewrite.java.refactor.JavaFormatter
-
public class JavaFormatter extends org.openrewrite.refactor.Formatter
-
-
Constructor Summary
Constructors Constructor Description JavaFormatter(J.CompilationUnit cu)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
enclosingIndent(org.openrewrite.Tree enclosesBoth)
org.openrewrite.Formatting
format(org.openrewrite.Cursor cursor)
org.openrewrite.Formatting
format(org.openrewrite.Tree relativeToEnclosing)
boolean
isIndentedWithSpaces()
ShiftFormatRightVisitor
shiftRight(org.openrewrite.Tree moving, org.openrewrite.Tree into, org.openrewrite.Tree enclosesBoth)
-
-
-
Constructor Detail
-
JavaFormatter
public JavaFormatter(J.CompilationUnit cu)
-
-
Method Detail
-
format
public org.openrewrite.Formatting format(org.openrewrite.Tree relativeToEnclosing)
-
format
public org.openrewrite.Formatting format(org.openrewrite.Cursor cursor)
-
shiftRight
public ShiftFormatRightVisitor shiftRight(org.openrewrite.Tree moving, org.openrewrite.Tree into, org.openrewrite.Tree enclosesBoth)
- Parameters:
moving
- The tree that is movinginto
- The block the tree is moving into- Returns:
- A shift right format visitor that can be appended to a refactor visitor pipeline
-
enclosingIndent
public static int enclosingIndent(org.openrewrite.Tree enclosesBoth)
-
isIndentedWithSpaces
public boolean isIndentedWithSpaces()
-
-