@Deprecated public class PrettyPrinterConfiguration extends Object implements PrinterConfiguration
PrettyPrinter
.
This class is no longer acceptable to use because it is not sufficiently configurable and it is too tied to a specific implementation
Use interface or DefaultPrinterConfiguration default implementation
instead.
Constructor and Description |
---|
PrettyPrinterConfiguration()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
PrinterConfiguration |
addOption(ConfigurationOption option)
Deprecated.
|
Set<ConfigurationOption> |
get()
Deprecated.
|
Optional<ConfigurationOption> |
get(ConfigurationOption option)
Deprecated.
|
String |
getEndOfLineCharacter()
Deprecated.
|
String |
getIndent()
Deprecated.
(@see Indentation.getIndent())
|
Indentation |
getIndentation()
Deprecated.
|
int |
getIndentSize()
Deprecated.
(@see Indentation.size)
|
Indentation.IndentType |
getIndentType()
Deprecated.
(@see Indentation.type)
|
int |
getMaxEnumConstantsToAlignHorizontally()
Deprecated.
|
int |
getTabWidth()
Deprecated.
(@see Indentation.size)
|
boolean |
isActivated(ConfigurationOption option)
Deprecated.
|
boolean |
isColumnAlignFirstMethodChain()
Deprecated.
|
boolean |
isColumnAlignParameters()
Deprecated.
|
boolean |
isIgnoreComments()
Deprecated.
|
boolean |
isIndentCaseInSwitch()
Deprecated.
|
boolean |
isOrderImports()
Deprecated.
|
boolean |
isPrintComments()
Deprecated.
|
boolean |
isPrintJavadoc()
Deprecated.
|
boolean |
isSpaceAroundOperators()
Deprecated.
|
PrinterConfiguration |
removeOption(ConfigurationOption option)
Deprecated.
|
PrettyPrinterConfiguration |
setColumnAlignFirstMethodChain(boolean columnAlignFirstMethodChain)
Deprecated.
|
PrettyPrinterConfiguration |
setColumnAlignParameters(boolean columnAlignParameters)
Deprecated.
|
PrettyPrinterConfiguration |
setEndOfLineCharacter(String endOfLineCharacter)
Deprecated.
Set the character to append when a line should end.
|
PrettyPrinterConfiguration |
setIndentation(Indentation indentation)
Deprecated.
|
PrettyPrinterConfiguration |
setIndentCaseInSwitch(boolean indentInSwitch)
Deprecated.
|
PrettyPrinterConfiguration |
setIndentSize(int indentSize)
Deprecated.
(@see Indentation.size())
|
PrettyPrinterConfiguration |
setIndentType(Indentation.IndentType indentType)
Deprecated.
(@see Indentation.type())
|
PrettyPrinterConfiguration |
setMaxEnumConstantsToAlignHorizontally(int maxEnumConstantsToAlignHorizontally)
Deprecated.
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).
|
PrettyPrinterConfiguration |
setOrderImports(boolean orderImports)
Deprecated.
When true, orders imports by alphabetically.
|
PrettyPrinterConfiguration |
setPrintComments(boolean printComments)
Deprecated.
When true, all comments will be printed, unless printJavadoc is false, then only line and block comments will be
printed.
|
PrettyPrinterConfiguration |
setPrintJavadoc(boolean printJavadoc)
Deprecated.
When true, Javadoc will be printed.
|
PrettyPrinterConfiguration |
setSpaceAroundOperators(boolean spaceAroundOperators)
Deprecated.
Set if there should be spaces between operators
|
PrettyPrinterConfiguration |
setTabWidth(int tabWidth)
Deprecated.
(@see Indentation.size)
|
public Indentation getIndentation()
public PrettyPrinterConfiguration setIndentation(Indentation indentation)
@Deprecated public String getIndent()
@Deprecated public int getIndentSize()
@Deprecated public PrettyPrinterConfiguration setIndentSize(int indentSize)
@Deprecated public Indentation.IndentType getIndentType()
@Deprecated public PrettyPrinterConfiguration setIndentType(Indentation.IndentType indentType)
@Deprecated public int getTabWidth()
@Deprecated public PrettyPrinterConfiguration setTabWidth(int tabWidth)
public boolean isOrderImports()
public boolean isPrintComments()
public boolean isIgnoreComments()
public boolean isSpaceAroundOperators()
public boolean isPrintJavadoc()
public boolean isColumnAlignParameters()
public boolean isColumnAlignFirstMethodChain()
public boolean isIndentCaseInSwitch()
public PrettyPrinterConfiguration setPrintComments(boolean printComments)
public PrettyPrinterConfiguration setPrintJavadoc(boolean printJavadoc)
public PrettyPrinterConfiguration setSpaceAroundOperators(boolean spaceAroundOperators)
public PrettyPrinterConfiguration setColumnAlignParameters(boolean columnAlignParameters)
public PrettyPrinterConfiguration setColumnAlignFirstMethodChain(boolean columnAlignFirstMethodChain)
public PrettyPrinterConfiguration setIndentCaseInSwitch(boolean indentInSwitch)
public String getEndOfLineCharacter()
public PrettyPrinterConfiguration setEndOfLineCharacter(String endOfLineCharacter)
public PrettyPrinterConfiguration setOrderImports(boolean orderImports)
public int getMaxEnumConstantsToAlignHorizontally()
public PrettyPrinterConfiguration setMaxEnumConstantsToAlignHorizontally(int maxEnumConstantsToAlignHorizontally)
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 large number to always align horizontally. Set it to 1 or less to always align vertically.
public PrinterConfiguration addOption(ConfigurationOption option)
addOption
in interface PrinterConfiguration
public boolean isActivated(ConfigurationOption option)
isActivated
in interface PrinterConfiguration
public Optional<ConfigurationOption> get(ConfigurationOption option)
get
in interface PrinterConfiguration
public Set<ConfigurationOption> get()
get
in interface PrinterConfiguration
public PrinterConfiguration removeOption(ConfigurationOption option)
removeOption
in interface PrinterConfiguration
Copyright © 2007–2023. All rights reserved.