Package spoon.reflect.visitor
Class ListPrinter
java.lang.Object
spoon.reflect.visitor.ListPrinter
- All Implemented Interfaces:
- Closeable,- AutoCloseable
Helper which assures consistent printing of lists
 prefixed with `start`, separated by `separator` and suffixed by `end`.
If there is no item in the list then it prints `start` and then `end`
If there is one item in the list then it prints `start`, item and then `end`
If there is more then one items in the list then it prints `start`, items separated by `separator` and then `end`
If there is no item in the list then it prints `start` and then `end`
If there is one item in the list then it prints `start`, item and then `end`
If there is more then one items in the list then it prints `start`, items separated by `separator` and then `end`
- 
Constructor SummaryConstructorsConstructorDescriptionListPrinter(TokenWriter printerHelper, boolean startPrefixSpace, String start, boolean startSuffixSpace, boolean nextPrefixSpace, String next, boolean nextSuffixSpace, boolean endPrefixSpace, String end)
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()voidCall that before printing of list item starts
- 
Constructor Details- 
ListPrinterpublic ListPrinter(TokenWriter printerHelper, boolean startPrefixSpace, String start, boolean startSuffixSpace, boolean nextPrefixSpace, String next, boolean nextSuffixSpace, boolean endPrefixSpace, String end)
 
- 
- 
Method Details- 
printSeparatorIfAppropriatepublic void printSeparatorIfAppropriate()Call that before printing of list item starts
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
 
 
-