org.nakedobjects.metamodel.commons.names
Class NameUtils

java.lang.Object
  extended by org.nakedobjects.metamodel.commons.names.NameUtils

public final class NameUtils
extends java.lang.Object


Method Summary
static java.lang.String capitalizeName(java.lang.String name)
           
static java.lang.String javaBaseName(java.lang.String javaName)
          Returns the name of a Java entity without any prefix.
static boolean startsWith(java.lang.String fullMethodName, java.lang.String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

javaBaseName

public static java.lang.String javaBaseName(java.lang.String javaName)
Returns the name of a Java entity without any prefix. A prefix is defined as the first set of lowercase letters and the name is characters from, and including, the first upper case letter. If no upper case letter is found then an empty string is returned.

Calling this method with the following Java names will produce these results:

                     getCarRegistration        -> CarRegistration
                     CityMayor -> CityMayor
                     isReady -> Ready
 


capitalizeName

public static java.lang.String capitalizeName(java.lang.String name)

startsWith

public static boolean startsWith(java.lang.String fullMethodName,
                                 java.lang.String prefix)


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.