Class Indentation
- java.lang.Object
-
- com.github.javaparser.printer.configuration.Indentation
-
public class Indentation extends java.lang.Object
This class defines the characteristics of an indentation: the type (space, tabs..) and the size (How many characters must be used to indent the code).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Indentation.IndentType
-
Field Summary
Fields Modifier and Type Field Description private static int
DEFAULT_SIZE
private java.lang.String
formattedIndentation
private int
size
private Indentation.IndentType
type
-
Constructor Summary
Constructors Constructor Description Indentation(Indentation.IndentType type)
Indentation(Indentation.IndentType type, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
format()
java.lang.String
getIndent()
int
getSize()
Indentation.IndentType
getType()
Indentation
setSize(int size)
Indentation
setType(Indentation.IndentType type)
java.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT_SIZE
private static final int DEFAULT_SIZE
- See Also:
- Constant Field Values
-
type
private Indentation.IndentType type
-
size
private int size
-
formattedIndentation
private java.lang.String formattedIndentation
-
-
Constructor Detail
-
Indentation
public Indentation(Indentation.IndentType type, int size)
-
Indentation
public Indentation(Indentation.IndentType type)
-
-
Method Detail
-
setSize
public Indentation setSize(int size)
-
getSize
public int getSize()
-
setType
public Indentation setType(Indentation.IndentType type)
-
getType
public Indentation.IndentType getType()
-
getIndent
public java.lang.String getIndent()
-
format
private void format()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-