Package org.apache.torque.generator.processor.string

# Class Camelbacker

java.lang.Object
org.apache.torque.generator.processor.string.Camelbacker

All Implemented Interfaces:
  `StringProcessor`

public class Camelbacker extends Object implements StringProcessor
Creates a String in CaMelBaCk case from a String with special characters

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Camelbacker()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getIgnorePartAfter()`
  Returns the separation chars which define the tail to be removed.
  `String`
  `getIgnorePartBefore()`
  Returns the separation characters which defile the prefix to be removed.
  `String`
  `getRemoveWithoutUppercase()`
  Returns which characters are removed from the processed String.
  `String`
  `getRemoveWithUppercase()`
  Returns the characters which are removed from the processed String and cause the following character to be converted to upper case.
  `boolean`
  `isDefaultLowerCase()`
  Returns whether all characters in the processed String should be made lower Case by default (i.e if none of the camelback rules is applicable).
  `boolean`
  `isFirstCharUppercase()`
  Returns whether the first character is always converted to upper case.
  `String`
  `process(String toProcess)`
  Does the camelback processing according to the settings.
  `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.

  ### Methods inherited from class java.lang.Object

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

- ## Constructor Details

  - ### Camelbacker

    public Camelbacker()

- ## Method Details

  - ### process

    public String process(String toProcess)
    Does the camelback processing according to the settings.
    Specified by:
      `process` in interface `StringProcessor`
    Parameters:
      `toProcess` - the String to process.
    Returns:
      the processed String.

  - ### isFirstCharUppercase

    public boolean isFirstCharUppercase()
    Returns whether the first character is always converted to upper case.
    Returns:
      true if the first character is always converted to upper case, false if not.

  - ### setFirstCharUppercase

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

  - ### getIgnorePartAfter

    public String getIgnorePartAfter()
    Returns the separation chars which define the tail 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.
    Returns:
      the separation chars for removing the tail.

  - ### 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.
    Parameters:
      `ignorePartAfter` - the separation chars for removing the tail.

  - ### getIgnorePartBefore

    public String getIgnorePartBefore()
    Returns the separation characters which defile 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.
    Returns:
      the separation chars which define the suffix to be removed.

  - ### 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.
    Parameters:
      `ignorePartBefore` - the separation chars which define the suffix to be removed.

  - ### getRemoveWithoutUppercase

    public String getRemoveWithoutUppercase()
    Returns which characters are removed from the processed String.
    Returns:
      a String containing all characters which are simply removed from the input String.

  - ### setRemoveWithoutUppercase

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

  - ### getRemoveWithUppercase

    public String getRemoveWithUppercase()
    Returns the characters which are removed from the processed String and cause the following character to be converted to upper case.
    Returns:
      a String containing all characters which are removed from the input String and which cause the following character to be converted to upper case.

  - ### 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 "_-"
    Parameters:
      `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.

  - ### isDefaultLowerCase

    public boolean isDefaultLowerCase()
    Returns whether all characters in the processed String should be made lower Case by default (i.e if none of the camelback rules is applicable).
    Returns:
      true if all characters are converted to lower case by default, false if not.

  - ### 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.
    Parameters:
      `defaultLowerCase` - true if all characters are converted to lower case by default, false if not.