Package org.apache.torque.generator.outlet.java

# Klasse CamelbackOutlet

java.lang.Object
org.apache.torque.generator.outlet.OutletImpl
org.apache.torque.generator.outlet.java.OutletWithoutMergepoints
org.apache.torque.generator.outlet.java.StringInputOutlet
org.apache.torque.generator.outlet.java.CamelbackOutlet

Alle implementierten Schnittstellen:
  `Outlet`

public class CamelbackOutlet extends StringInputOutlet
Transform a String to its camelback version. This is typically useful when creating java class or attribute names. The name can be truncated before/after special characters, other special characters can be removed, and still other characters can be removed plus the next character is transformed into upper case. If wrapReservedJavaWords is set to true, the result will be prepended with an underscore if the result of the transwormation would be a reserved word within the java syntax (e.g. int, for etc...)

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `CamelbackOutlet(QualifiedName qualifiedName)`
  Constructor.

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `OutletResult`
  `execute(ControllerState controllerState)`
  Processes the input according to the camelback rules.
  `void`
  `setDefaultLowerCase(boolean defaultLowerCase)`
  Sets whether all characters in the processed String should be made lower Case by default (i.e if none of the camelback rules is applicable).
  `void`
  `setFirstCharUppercase(boolean firstCharUppercase)`
  Sets whether the first character should always be upper case.
  `void`
  `setIgnorePartAfter(String ignorePartAfter)`
  Sets the separation chars which define the suffix to be removed.
  `void`
  `setIgnorePartBefore(String ignorePartBefore)`
  Sets the separation characters which define the prefix to be removed.
  `void`
  `setRemoveWithoutUppercase(String removeWithoutUppercase)`
  Sets which characters are removed from the processed String.
  `void`
  `setRemoveWithUppercase(String removeWithUppercase)`
  Sets the characters which are removed from the processed String and cause the following character to be converted to upper case.
  `void`
  `setReservedJavaWordsPrefix(String prefix)`
  Sets the prefix which is prepended to reserved java words.
  `void`
  `setReservedJavaWordsSuffix(String suffix)`
  Sets the suffix which is prepended to reserved java words.
  `void`
  `setWrapReservedJavaWords(boolean wrapReservedJavaWords)`
  Sets whether reserved java words (as output of the camelbacker) are wrapped (prepended or appended).

  ### Von Klasse geerbte Methoden org.apache.torque.generator.outlet.java.StringInputOutlet

  `getInput, setInputOption, setInputSourceElement, setInputValue, setInputVariable, setSourceElementAttribute`

  ### Von Klasse geerbte Methoden org.apache.torque.generator.outlet.java.OutletWithoutMergepoints

  `addMergepointMapping, getMergepointMapping`

  ### Von Klasse geerbte Methoden org.apache.torque.generator.outlet.OutletImpl

  `afterExecute, beforeExecute, getInputClass, getInputElementName, getMergepointMappings, getName, getVariable, mergepoint, setInputClass, setInputElementName, setMergepointMapping, setVariable, setVariable, toString`

  ### Von Klasse geerbte Methoden java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Konstruktordetails

  - ### CamelbackOutlet

    public CamelbackOutlet(QualifiedName qualifiedName)
    Constructor.
    Parameter:
      `qualifiedName` - the unique name of the outlet, not null.

- ## Methodendetails

  - ### setRemoveWithoutUppercase

    public void setRemoveWithoutUppercase(String removeWithoutUppercase)
    Sets which characters are removed from the processed String. Default is "."
    Parameter:
      `removeWithoutUppercase` - a String containing all characters which are simply removed from the input String.

  - ### setRemoveWithUppercase

    public void setRemoveWithUppercase(String removeWithUppercase)
    Sets the characters which are removed from the processed String and cause the following character to be converted to upper case. Default is "_-"
    Parameter:
      `removeWithUppercase` - a String containing all characters which are removed from the input String and which cause the following character to be converted to upper case.

  - ### setDefaultLowerCase

    public void setDefaultLowerCase(boolean defaultLowerCase)
    Sets whether all characters in the processed String should be made lower Case by default (i.e if none of the camelback rules is applicable). Default is true.
    Parameter:
      `defaultLowerCase` - true if all characters are converted to lower case by default, false if not.

  - ### setIgnorePartBefore

    public void setIgnorePartBefore(String ignorePartBefore)
    Sets the separation characters which define the prefix to be removed. If one of the characters in this String is encountered in the processed String, the part of the processed String before it are ignored. The character itself is retained, unless it is removed by another rule.
    Parameter:
      `ignorePartBefore` - the separation chars which define the suffix to be removed.

  - ### setIgnorePartAfter

    public void setIgnorePartAfter(String ignorePartAfter)
    Sets the separation chars which define the suffix to be removed. If one of the characters in this String is encountered in the processed String, the part of the processed String after it are ignored. The character itself is retained, unless it is removed by another rule.
    Parameter:
      `ignorePartAfter` - the separation chars for removing the tail.

  - ### setFirstCharUppercase

    public void setFirstCharUppercase(boolean firstCharUppercase)
    Sets whether the first character should always be upper case. Default is true.
    Parameter:
      `firstCharUppercase` - true if the first character should always be converted to upper case, false if not.

  - ### setWrapReservedJavaWords

    public void setWrapReservedJavaWords(boolean wrapReservedJavaWords)
    Sets whether reserved java words (as output of the camelbacker) are wrapped (prepended or appended). Default is true.
    Parameter:
      `wrapReservedJavaWords` - true if reserved java words should be wrapped, false if not.

  - ### setReservedJavaWordsPrefix

    public void setReservedJavaWordsPrefix(String prefix)
    Sets the prefix which is prepended to reserved java words. Default is "_".
    Parameter:
      `prefix` - the new prefix, not null.

  - ### setReservedJavaWordsSuffix

    public void setReservedJavaWordsSuffix(String suffix)
    Sets the suffix which is prepended to reserved java words. Default is the empty String.
    Parameter:
      `suffix` - the new suffix, not null.

  - ### execute

    public OutletResult execute(ControllerState controllerState) throws GeneratorException
    Processes the input according to the camelback rules.
    Angegeben von:
      `execute` in Schnittstelle `Outlet`
    Angegeben von:
      `execute` in Klasse `OutletImpl`
    Parameter:
      `controllerState` - the current state of the controller, not null.
    Gibt zurück:
      the output of the Outlet.
    Löst aus:
      `GeneratorException` - in processing fails.