Package EDU.purdue.jtb.common
Class Spacing
- java.lang.Object
-
- EDU.purdue.jtb.common.Spacing
-
public class Spacing extends java.lang.Object
ClassSpacing
manages the indentation information for pretty printing.Class maintains a state, and is not supposed to be run in parallel threads (on the same generated class).
-
-
Field Summary
Fields Modifier and Type Field Description int
indentLevel
The indentation leveljava.lang.String
spc
The indentation string
-
Constructor Summary
Constructors Constructor Description Spacing(int aIndentAmt)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
Returns the indentation string corresponding to the indentation amount and level.void
updateSpc(int numIndentLvls)
Updates the indentation.
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns the indentation string corresponding to the indentation amount and level.- Overrides:
toString
in classjava.lang.Object
-
updateSpc
public void updateSpc(int numIndentLvls)
Updates the indentation.- Parameters:
numIndentLvls
- - the (positive or negative) indentation level delta.
-
-