Class NewlineOutlet
java.lang.Object
org.apache.torque.generator.outlet.OutletImpl
org.apache.torque.generator.outlet.java.OutletWithoutMergepoints
org.apache.torque.generator.outlet.java.NewlineOutlet
- All Implemented Interfaces:
Outlet
Creates new lines (\n or \r\n).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charThe carriage return char '\r'.static final charThe newline char '\r'. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(ControllerState controllerState) Generates the output for this template into the Generated object.intgetCount()Returns how many newlines should be created.booleanReturns whether windows newlines (\r\n) are used.voidsetCount(int count) Sets how many newlines should be created.voidsetWindowsStyle(boolean windowsStyle) Sets whether windows newlines (\r\n) are used.Methods inherited from class org.apache.torque.generator.outlet.java.OutletWithoutMergepoints
addMergepointMapping, getMergepointMappingMethods inherited from class org.apache.torque.generator.outlet.OutletImpl
afterExecute, beforeExecute, getInputClass, getInputElementName, getMergepointMappings, getName, getVariable, mergepoint, setInputClass, setInputElementName, setMergepointMapping, setVariable, setVariable, toString
-
Field Details
-
CARRIAGE_RETURN
public static final char CARRIAGE_RETURNThe carriage return char '\r'.- See Also:
-
NEWLINE
public static final char NEWLINEThe newline char '\r'.- See Also:
-
-
Constructor Details
-
NewlineOutlet
Constructor.- Parameters:
name- the qualified name of the outlet.
-
-
Method Details
-
execute
Description copied from interface:OutletGenerates the output for this template into the Generated object.- Specified by:
executein interfaceOutlet- Specified by:
executein classOutletImpl- Parameters:
controllerState- the current controller state, not null.- Returns:
- the output of the Outlet.
- Throws:
GeneratorException- if generation fails.
-
getCount
public int getCount()Returns how many newlines should be created.- Returns:
- how many newlines should be created.
-
setCount
public void setCount(int count) Sets how many newlines should be created.- Parameters:
count- how many newlines should be created.
-
isWindowsStyle
public boolean isWindowsStyle()Returns whether windows newlines (\r\n) are used.- Returns:
- whether windows newlines are used.
-
setWindowsStyle
public void setWindowsStyle(boolean windowsStyle) Sets whether windows newlines (\r\n) are used.- Parameters:
windowsStyle- whether windows newlines should be used.
-