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

## org.apache.cayenne.util
Class NameConverter

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

    public class NameConverter

extends java.lang.Object

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

Author:
  Andrei Adamchik

Constructor Summary
`NameConverter()`

Method Summary
`static java.lang.String` | `javaToUnderscored(java.lang.String name)` Converts a String name to a String forllowing java convention for the static final variables.
`static java.lang.String` | `underscoredToJava(java.lang.String name, boolean capitalize)` Converts names like "ABCD_EFG_123" to Java-style names like "abcdEfg123".
`static java.lang.String` | `undescoredToJava(java.lang.String name, boolean capitalize)` Deprecated. since 1.2 replaced with `underscoredToJava(String, boolean)`, fixing the naming typo.

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 java.lang.String javaToUnderscored(java.lang.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

### undescoredToJava

    public static java.lang.String undescoredToJava(java.lang.String name,
                                                    boolean capitalize)

  Deprecated. since 1.2 replaced with `underscoredToJava(String, boolean)`, fixing the naming typo.

### underscoredToJava

    public static java.lang.String underscoredToJava(java.lang.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

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

Copyright © 2001-2006 Apache.org All Rights Reserved.