org.apache.cayenne.gen
Class StringUtils

java.lang.Object
  extended by org.apache.cayenne.gen.StringUtils

public class StringUtils
extends java.lang.Object

Methods for mangling strings.

Author:
Mike Kienenberger

Constructor Summary
StringUtils()
           
 
Method Summary
 java.lang.String capitalized(java.lang.String name)
          Capitalizes the first letter of the property name.
 java.lang.String capitalizedAsConstant(java.lang.String name)
          Converts property name to Java constants naming convention.
 java.lang.String formatVariableName(java.lang.String variableName)
          Prepends underscore to variable name if necessary to remove conflict with reserved keywords.
static StringUtils getInstance()
           
 java.lang.String stripClass(java.lang.String aString)
          Removes base name, leaving package name.
 java.lang.String stripPackageName(java.lang.String aString)
          Removes package name, leaving base name.
static java.lang.String uncapitalized(java.lang.String aString)
          Returns string with lowercased first letter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

getInstance

public static StringUtils getInstance()

formatVariableName

public java.lang.String formatVariableName(java.lang.String variableName)
Prepends underscore to variable name if necessary to remove conflict with reserved keywords.


stripPackageName

public java.lang.String stripPackageName(java.lang.String aString)
Removes package name, leaving base name.

Since:
1.2

stripClass

public java.lang.String stripClass(java.lang.String aString)
Removes base name, leaving package name.

Since:
1.2

capitalized

public java.lang.String capitalized(java.lang.String name)
Capitalizes the first letter of the property name.

Since:
1.1

uncapitalized

public static java.lang.String uncapitalized(java.lang.String aString)
Returns string with lowercased first letter

Since:
1.2

capitalizedAsConstant

public java.lang.String capitalizedAsConstant(java.lang.String name)
Converts property name to Java constants naming convention.

Since:
1.1


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