org.apache.cayenne.util

## Class NameConverter

- java.lang.Object
- - org.apache.cayenne.util.NameConverter

-     public class NameConverter
      extends Object

  Utility class to convert from different naming styles to Java convention. For example names like "ABCD_EFG" can be converted to "abcdEfg".

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NameConverter()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `javaToUnderscored(String name)` Converts a String name to a String forllowing java convention for the static final variables.
    `static String` | `specialCharsToJava(String string)` Replaces special chars with human-readable and Java-id-compatible symbols.
    `static String` | `underscoredToJava(String name, boolean capitalize)` Converts names like "ABCD_EFG_123" to Java-style names like "abcdEfg123".

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

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

- - ### Constructor Detail

    - #### NameConverter

          public NameConverter()

  - ### Method Detail

    - #### javaToUnderscored

          public static String javaToUnderscored(String name)

      Converts a String name to a String forllowing java convention for the static final variables. E.g. "abcXyz" will be converted to "ABC_XYZ".
      Since:
        1.0.3

    - #### underscoredToJava

          public static String underscoredToJava(String name,
                                                 boolean capitalize)

      Converts names like "ABCD_EFG_123" to Java-style names like "abcdEfg123". If `capitalize` is true, returned name is capitalized (for instance if this is a class name).
      Since:
        1.2

    - #### specialCharsToJava

          public static String specialCharsToJava(String string)

      Replaces special chars with human-readable and Java-id-compatible symbols.

Copyright © 2001–2018 Apache Cayenne. All rights reserved.