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 Summary
Enum Constants Enum Constant Description COLUMN_ALIGN_FIRST_METHOD_CHAIN
COLUMN_ALIGN_PARAMETERS
END_OF_LINE_CHARACTER
INDENT_CASE_IN_SWITCH
Indent the case when it is true, don't if falseINDENT_PRINT_ARRAYS_OF_ANNOTATIONS
This parameter allows to print pretty formatted arraysINDENTATION
Indentation proprertyMAX_ENUM_CONSTANTS_TO_ALIGN_HORIZONTALLY
By default enum constants get aligned like this:ORDER_IMPORTS
Order imports alphabeticallyPRINT_COMMENTS
Print comments only.PRINT_JAVADOC
Print javadoc comments only.SORT_IMPORTS_STRATEGY
The logic to be used when ordering the imports.SPACE_AROUND_OPERATORS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DefaultPrinterConfiguration.ConfigOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static DefaultPrinterConfiguration.ConfigOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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.
-
PRINT_COMMENTS
public static final DefaultPrinterConfiguration.ConfigOption PRINT_COMMENTS
Print comments only. It can be combined withPRINT_JAVADOC
to print regular comments and javadoc.
-
PRINT_JAVADOC
public static final DefaultPrinterConfiguration.ConfigOption PRINT_JAVADOC
Print javadoc comments only. It can be combined withPRINT_COMMENTS
to print regular javadoc and comments
-
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 falseswitch(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:
Set it to a very large number (e.g.enum X { A, B, C, D, E, F, 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{@code
-
-
Method Detail
-
values
public static DefaultPrinterConfiguration.ConfigOption[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DefaultPrinterConfiguration.ConfigOption c : DefaultPrinterConfiguration.ConfigOption.values()) System.out.println(c);
- 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 nameNullPointerException
- if the argument is null
-
-