Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.torque.generator.outlet.java
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

    public class NewlineOutlet

extends OutletWithoutMergepoints

Creates new lines (\n or \r\n).

Field Summary
`static char` | `CARRIAGE_RETURN` The carriage return char '\r'.
`static char` | `NEWLINE` The newline char '\r'.

Constructor Summary
`NewlineOutlet(QualifiedName name)` Constructor.

Method Summary
`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.

Methods inherited from class org.apache.torque.generator.outlet.java.OutletWithoutMergepoints
`addMergepointMapping, getMergepointMapping`

Methods inherited from class org.apache.torque.generator.outlet.OutletImpl
`afterExecute, beforeExecute, getInputElementName, getMergepointMappings, getName, getVariable, mergepoint, setInputElementName, setMergepointMapping, setVariable, setVariable, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### CARRIAGE_RETURN

    public static final char CARRIAGE_RETURN

  The carriage return char '\r'.

  See Also:
    Constant Field Values

### NEWLINE

    public static final char NEWLINE

  The newline char '\r'.

  See Also:
    Constant Field Values

Constructor Detail

### NewlineOutlet

    public NewlineOutlet(QualifiedName name)

  Constructor.

  Parameters:
    `name` - the qualified name of the outlet.

Method Detail

### execute

    public OutletResult execute(ControllerState controllerState)
                         throws GeneratorException

  Description copied from interface: `Outlet`
  Generates the output for this template into the Generated object.

  Specified by:
    `execute` in interface `Outlet`
  Specified by:
    `execute` in class `OutletImpl`
  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2013 The Apache Software Foundation. All Rights Reserved.