Dashboard Builder Commons 6.0.0.Final

org.jboss.dashboard.commons.text
Class JavaNamesFormatter

java.lang.Object
  extended by org.jboss.dashboard.commons.text.JavaNamesFormatter

public class JavaNamesFormatter
extends Object

Allows formatting a String to a name acomplishing java names conventions.


Method Summary
static String getterName(String propertyName)
          Utility function to get the name of the getter corresponding a given property.
static String setterName(String propertyName)
          Utility function to get the name of the setter corresponding a given property.
static String toJavaName(String name, boolean firstLetterIsUpperCase)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toJavaName

public static String toJavaName(String name,
                                boolean firstLetterIsUpperCase)
Description of the Method

Parameters:
name - Description of the Parameter
firstLetterIsUpperCase - Description of the Parameter
Returns:
Description of the Return Value

setterName

public static String setterName(String propertyName)
Utility function to get the name of the setter corresponding a given property.

Parameters:
propertyName - The name of the property, e.g., "name".
Returns:
The name of the method that sets that property, for instance, "setName".

getterName

public static String getterName(String propertyName)
Utility function to get the name of the getter corresponding a given property.

Parameters:
propertyName - The name of the property, e.g., "name".
Returns:
The name of the method that gets that property, for instance, "getTitle".

Dashboard Builder Commons 6.0.0.Final

Copyright © 2012-2013 JBoss by Red Hat. All Rights Reserved.