Class PrettyPrinterConfiguration
- java.lang.Object
-
- com.github.javaparser.printer.configuration.PrettyPrinterConfiguration
-
- All Implemented Interfaces:
PrinterConfiguration
@Deprecated public class PrettyPrinterConfiguration extends Object implements PrinterConfiguration
Deprecated.This class could be removed in a future version. Use default DefaultPrinterConfiguration.Configuration options for thePrettyPrinter. This class is no longer acceptable to use because it is not sufficiently configurable and it is too tied to a specific implementationUse
interface or DefaultPrinterConfiguration default implementationinstead.
-
-
Constructor Summary
Constructors Constructor Description PrettyPrinterConfiguration()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PrinterConfigurationaddOption(ConfigurationOption option)Deprecated.Set<ConfigurationOption>get()Deprecated.Optional<ConfigurationOption>get(ConfigurationOption option)Deprecated.StringgetEndOfLineCharacter()Deprecated.StringgetIndent()Deprecated.(@see Indentation.getIndent())IndentationgetIndentation()Deprecated.intgetIndentSize()Deprecated.(@see Indentation.size)Indentation.IndentTypegetIndentType()Deprecated.(@see Indentation.type)intgetMaxEnumConstantsToAlignHorizontally()Deprecated.intgetTabWidth()Deprecated.(@see Indentation.size)booleanisActivated(ConfigurationOption option)Deprecated.booleanisColumnAlignFirstMethodChain()Deprecated.booleanisColumnAlignParameters()Deprecated.booleanisIgnoreComments()Deprecated.booleanisIndentCaseInSwitch()Deprecated.booleanisOrderImports()Deprecated.booleanisPrintComments()Deprecated.booleanisPrintJavadoc()Deprecated.booleanisSpaceAroundOperators()Deprecated.PrinterConfigurationremoveOption(ConfigurationOption option)Deprecated.PrettyPrinterConfigurationsetColumnAlignFirstMethodChain(boolean columnAlignFirstMethodChain)Deprecated.PrettyPrinterConfigurationsetColumnAlignParameters(boolean columnAlignParameters)Deprecated.PrettyPrinterConfigurationsetEndOfLineCharacter(String endOfLineCharacter)Deprecated.Set the character to append when a line should end.PrettyPrinterConfigurationsetIndentation(Indentation indentation)Deprecated.PrettyPrinterConfigurationsetIndentCaseInSwitch(boolean indentInSwitch)Deprecated.PrettyPrinterConfigurationsetIndentSize(int indentSize)Deprecated.(@see Indentation.size())PrettyPrinterConfigurationsetIndentType(Indentation.IndentType indentType)Deprecated.(@see Indentation.type())PrettyPrinterConfigurationsetMaxEnumConstantsToAlignHorizontally(int maxEnumConstantsToAlignHorizontally)Deprecated.By default enum constants get aligned like this:PrettyPrinterConfigurationsetOrderImports(boolean orderImports)Deprecated.When true, orders imports by alphabetically.PrettyPrinterConfigurationsetPrintComments(boolean printComments)Deprecated.When true, all comments will be printed, unless printJavadoc is false, then only line and block comments will be printed.PrettyPrinterConfigurationsetPrintJavadoc(boolean printJavadoc)Deprecated.When true, Javadoc will be printed.PrettyPrinterConfigurationsetSpaceAroundOperators(boolean spaceAroundOperators)Deprecated.Set if there should be spaces between operatorsPrettyPrinterConfigurationsetTabWidth(int tabWidth)Deprecated.(@see Indentation.size)
-
-
-
Method Detail
-
getIndentation
public Indentation getIndentation()
Deprecated.
-
setIndentation
public PrettyPrinterConfiguration setIndentation(Indentation indentation)
Deprecated.
-
getIndent
@Deprecated public String getIndent()
Deprecated.(@see Indentation.getIndent())- Returns:
- the string that will be used to indent.
-
getIndentSize
@Deprecated public int getIndentSize()
Deprecated.(@see Indentation.size)- Returns:
- the indentation size.
-
setIndentSize
@Deprecated public PrettyPrinterConfiguration setIndentSize(int indentSize)
Deprecated.(@see Indentation.size())Set the size of the indent in characters.
-
getIndentType
@Deprecated public Indentation.IndentType getIndentType()
Deprecated.(@see Indentation.type)Get the type of indent to produce.
-
setIndentType
@Deprecated public PrettyPrinterConfiguration setIndentType(Indentation.IndentType indentType)
Deprecated.(@see Indentation.type())Set the type of indent to produce.
-
getTabWidth
@Deprecated public int getTabWidth()
Deprecated.(@see Indentation.size)Get the tab width for pretty aligning.
-
setTabWidth
@Deprecated public PrettyPrinterConfiguration setTabWidth(int tabWidth)
Deprecated.(@see Indentation.size)Set the tab width for pretty aligning.
-
isOrderImports
public boolean isOrderImports()
Deprecated.
-
isPrintComments
public boolean isPrintComments()
Deprecated.
-
isIgnoreComments
public boolean isIgnoreComments()
Deprecated.
-
isSpaceAroundOperators
public boolean isSpaceAroundOperators()
Deprecated.
-
isPrintJavadoc
public boolean isPrintJavadoc()
Deprecated.
-
isColumnAlignParameters
public boolean isColumnAlignParameters()
Deprecated.
-
isColumnAlignFirstMethodChain
public boolean isColumnAlignFirstMethodChain()
Deprecated.
-
isIndentCaseInSwitch
public boolean isIndentCaseInSwitch()
Deprecated.
-
setPrintComments
public 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.
-
setPrintJavadoc
public PrettyPrinterConfiguration setPrintJavadoc(boolean printJavadoc)
Deprecated.When true, Javadoc will be printed.
-
setSpaceAroundOperators
public PrettyPrinterConfiguration setSpaceAroundOperators(boolean spaceAroundOperators)
Deprecated.Set if there should be spaces between operators
-
setColumnAlignParameters
public PrettyPrinterConfiguration setColumnAlignParameters(boolean columnAlignParameters)
Deprecated.
-
setColumnAlignFirstMethodChain
public PrettyPrinterConfiguration setColumnAlignFirstMethodChain(boolean columnAlignFirstMethodChain)
Deprecated.
-
setIndentCaseInSwitch
public PrettyPrinterConfiguration setIndentCaseInSwitch(boolean indentInSwitch)
Deprecated.
-
getEndOfLineCharacter
public String getEndOfLineCharacter()
Deprecated.
-
setEndOfLineCharacter
public PrettyPrinterConfiguration setEndOfLineCharacter(String endOfLineCharacter)
Deprecated.Set the character to append when a line should end. Example values: "\n", "\r\n", "".
-
setOrderImports
public PrettyPrinterConfiguration setOrderImports(boolean orderImports)
Deprecated.When true, orders imports by alphabetically.
-
getMaxEnumConstantsToAlignHorizontally
public int getMaxEnumConstantsToAlignHorizontally()
Deprecated.
-
setMaxEnumConstantsToAlignHorizontally
public 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). 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.
-
addOption
public PrinterConfiguration addOption(ConfigurationOption option)
Deprecated.- Specified by:
addOptionin interfacePrinterConfiguration
-
isActivated
public boolean isActivated(ConfigurationOption option)
Deprecated.- Specified by:
isActivatedin interfacePrinterConfiguration
-
get
public Optional<ConfigurationOption> get(ConfigurationOption option)
Deprecated.- Specified by:
getin interfacePrinterConfiguration
-
get
public Set<ConfigurationOption> get()
Deprecated.- Specified by:
getin interfacePrinterConfiguration
-
removeOption
public PrinterConfiguration removeOption(ConfigurationOption option)
Deprecated.- Specified by:
removeOptionin interfacePrinterConfiguration
-
-