Class FormatAnnotationsStep


  • public final class FormatAnnotationsStep
    extends java.lang.Object
    Some formatters put every annotation on its own line -- even type annotations, which should be on the same line as the type they qualify. This class corrects the formatting. This is useful as a postprocessing step after a Java formatter that is not cognizant of type annotations.

    Note: A type annotation is an annotation that is meta-annotated with @Target({ElementType.TYPE_USE}).

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static FormatterStep create()  
      static FormatterStep create​(java.util.List<java.lang.String> addedTypeAnnotations, java.util.List<java.lang.String> removedTypeAnnotations)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static FormatterStep create​(java.util.List<java.lang.String> addedTypeAnnotations,
                                           java.util.List<java.lang.String> removedTypeAnnotations)