public class NewlineOutlet extends OutletWithoutMergepoints
Modifier and Type | Field and Description |
---|---|
static char |
CARRIAGE_RETURN
The carriage return char '\r'.
|
static char |
NEWLINE
The newline char '\r'.
|
Constructor and Description |
---|
NewlineOutlet(QualifiedName name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
OutletResult |
execute(ControllerState controllerState)
Generates the output for this template into the Generated object.
|
int |
getCount()
Returns how many newlines should be created.
|
boolean |
isWindowsStyle()
Returns whether windows newlines (\r\n) are used.
|
void |
setCount(int count)
Sets how many newlines should be created.
|
void |
setWindowsStyle(boolean windowsStyle)
Sets whether windows newlines (\r\n) are used.
|
addMergepointMapping, getMergepointMapping
afterExecute, beforeExecute, getInputClass, getInputElementName, getMergepointMappings, getName, getVariable, mergepoint, setInputClass, setInputElementName, setMergepointMapping, setVariable, setVariable, toString
public static final char CARRIAGE_RETURN
public static final char NEWLINE
public NewlineOutlet(QualifiedName name)
name
- the qualified name of the outlet.public OutletResult execute(ControllerState controllerState) throws GeneratorException
Outlet
execute
in interface Outlet
execute
in class OutletImpl
controllerState
- the current controller state, not null.GeneratorException
- if generation fails.public int getCount()
public void setCount(int count)
count
- how many newlines should be created.public boolean isWindowsStyle()
public void setWindowsStyle(boolean windowsStyle)
windowsStyle
- whether windows newlines should be used.Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.