Enum DefaultPrinterConfiguration.ConfigOption

java.lang.Object
java.lang.Enum<DefaultPrinterConfiguration.ConfigOption>
com.github.javaparser.printer.configuration.DefaultPrinterConfiguration.ConfigOption
All Implemented Interfaces:
Serializable, Comparable<DefaultPrinterConfiguration.ConfigOption>
Enclosing class:
DefaultPrinterConfiguration

public static enum DefaultPrinterConfiguration.ConfigOption extends Enum<DefaultPrinterConfiguration.ConfigOption>
  • Enum Constant Details

    • ORDER_IMPORTS

      public static final DefaultPrinterConfiguration.ConfigOption ORDER_IMPORTS
      Order imports alphabetically
    • SORT_IMPORTS_STRATEGY

      public static final DefaultPrinterConfiguration.ConfigOption SORT_IMPORTS_STRATEGY
      The logic to be used when ordering the imports.
    • SPACE_AROUND_OPERATORS

      public static final DefaultPrinterConfiguration.ConfigOption SPACE_AROUND_OPERATORS
    • COLUMN_ALIGN_PARAMETERS

      public static final DefaultPrinterConfiguration.ConfigOption COLUMN_ALIGN_PARAMETERS
    • COLUMN_ALIGN_FIRST_METHOD_CHAIN

      public static final DefaultPrinterConfiguration.ConfigOption COLUMN_ALIGN_FIRST_METHOD_CHAIN
    • INDENT_CASE_IN_SWITCH

      public static final DefaultPrinterConfiguration.ConfigOption INDENT_CASE_IN_SWITCH
      Indent the case when it is true, don't if false
      
       switch(x) {            switch(x) {
          case 1:             case 1:
              return y;           return y;
          case 2:             case 2:
              return z;           return x;
       }                       }
       
    • MAX_ENUM_CONSTANTS_TO_ALIGN_HORIZONTALLY

      public static final DefaultPrinterConfiguration.ConfigOption MAX_ENUM_CONSTANTS_TO_ALIGN_HORIZONTALLY
      By default enum constants get aligned like this:
      
           enum X {
              A, B, C, D
           }
       
       until the amount of constants passes this currentValue (5 by default).
       Then they get aligned like this:
       
      
           enum X {
              A,
              B,
              C,
              D,
              E,
              F,
              G
           }
       
      Set it to a very large number (e.g. Integer.MAX_VALUE to always align horizontally. Set it to 1 or less to always align vertically.
    • END_OF_LINE_CHARACTER

      public static final DefaultPrinterConfiguration.ConfigOption END_OF_LINE_CHARACTER
    • INDENTATION

      public static final DefaultPrinterConfiguration.ConfigOption INDENTATION
      Indentation proprerty
    • INDENT_PRINT_ARRAYS_OF_ANNOTATIONS

      public static final DefaultPrinterConfiguration.ConfigOption INDENT_PRINT_ARRAYS_OF_ANNOTATIONS
      This parameter allows to print pretty formatted arrays
      
           @ApiResponses(value = {
              @ApiResponse(responseCode = "200", description = "OK"),
              @ApiResponse(responseCode = "404", description = "Error")
           })
       
       instead of inline like this
       
      
               @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "404", description = "Error")})
       
  • Field Details

  • Constructor Details

    • ConfigOption

      private ConfigOption(Class clazz)
    • ConfigOption

      private ConfigOption(Class<T> clazz, T value)
  • Method Details

    • values

      public static DefaultPrinterConfiguration.ConfigOption[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DefaultPrinterConfiguration.ConfigOption valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null