public class PrinterHelper extends Object
Constructor and Description |
---|
PrinterHelper(Environment env) |
Modifier and Type | Method and Description |
---|---|
PrinterHelper |
adjustEndPosition(CtElement e) |
PrinterHelper |
adjustStartPosition(CtElement e)
writes as many newlines as needed to align the line number again between the element position and the current line number
|
PrinterHelper |
decTab()
Decrements the current number of tabs.
|
Map<Integer,Integer> |
getLineNumberMapping() |
String |
getLineSeparator() |
int |
getTabCount() |
PrinterHelper |
incTab()
Increments the current number of tabs.
|
void |
mapLine(CtElement e,
CompilationUnit unitExpected) |
void |
putLineNumberMapping(int valueLine) |
boolean |
removeLine() |
void |
reset()
resets to the initial state
|
void |
setLineSeparator(String lineSeparator) |
PrinterHelper |
setTabCount(int tabCount)
Sets the current number of tabs.
|
String |
toString() |
void |
undefineLine() |
PrinterHelper |
write(char c)
Outputs a char.
|
PrinterHelper |
write(String s)
Outputs a string.
|
PrinterHelper |
writeln()
Generates a new line.
|
void |
writeSpace()
writes a space ' '
|
PrinterHelper |
writeTabs()
Deprecated.
|
public PrinterHelper(Environment env)
public void reset()
public PrinterHelper write(String s)
public PrinterHelper write(char c)
public PrinterHelper writeln()
@Deprecated public PrinterHelper writeTabs()
public PrinterHelper incTab()
public PrinterHelper decTab()
public int getTabCount()
public PrinterHelper setTabCount(int tabCount)
public boolean removeLine()
public PrinterHelper adjustStartPosition(CtElement e)
public PrinterHelper adjustEndPosition(CtElement e)
public void undefineLine()
public void mapLine(CtElement e, CompilationUnit unitExpected)
public void putLineNumberMapping(int valueLine)
public String getLineSeparator()
public void setLineSeparator(String lineSeparator)
lineSeparator
- characters which will be printed as End of line.
By default there is System.getProperty("line.separator")public void writeSpace()
Copyright © 2007–2018 Inria. All rights reserved.