Class JavaFormatter


  • public class JavaFormatter
    extends org.openrewrite.refactor.Formatter
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.openrewrite.refactor.Formatter

        org.openrewrite.refactor.Formatter.Result
    • 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)  
      • Methods inherited from class org.openrewrite.refactor.Formatter

        findIndent, wholeSourceIndent
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 moving
        into - 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()