Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.scopemvc.application.timewarp.utilities
Class CodeUtils  view CodeUtils download CodeUtils.java

java.lang.Object
  extended byorg.scopemvc.application.timewarp.utilities.CodeUtils

public class CodeUtils
extends java.lang.Object

Various static utility methods

Original code from {link http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/middlegen/middlegen/src/java/middlegen/Util.java Util.java}

Version:
$Revision: 1.6 $

Field Summary
private static org.apache.commons.logging.Log log
          Get static reference to the logger
 
Constructor Summary
CodeUtils()
           
 
Method Summary
static boolean bool(java.lang.String s)
          Describe what the method does
static java.lang.String capitalise(java.lang.String s)
          Describe what the method does
static java.lang.String constantNameToVariableName(java.lang.String s)
          Converts a constant name to a java variable name (first letter capitalised).
static java.lang.String decapitalise(java.lang.String s2)
          Converts a database name (table or column) to a java name (first letter decapitalised).
static java.lang.String getQualifiedClassName(java.lang.String packageName, java.lang.String className)
          Gets the QualifiedClassName attribute of the Util class
static java.lang.String naturalNameToVariableName(java.lang.String s)
          Converts a natural name to a java variable name (first letter capitalised).
static java.lang.String pluralise(java.lang.String name)
          Describe what the method does
private static boolean seemsPluralised(java.lang.String name)
          Describe what the method does
static java.lang.String singularise(java.lang.String name)
          Describe what the method does
static java.lang.String string(boolean b)
          Describe what the method does
static java.lang.String variableNameToConstantName(java.lang.String s)
          Converts a java variable name to a containt name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log
Get static reference to the logger

Constructor Detail

CodeUtils

public CodeUtils()
Method Detail

getQualifiedClassName

public static java.lang.String getQualifiedClassName(java.lang.String packageName,
                                                     java.lang.String className)
Gets the QualifiedClassName attribute of the Util class


decapitalise

public static java.lang.String decapitalise(java.lang.String s2)
Converts a database name (table or column) to a java name (first letter decapitalised). employee_name -> employeeName


bool

public static boolean bool(java.lang.String s)
Describe what the method does


string

public static java.lang.String string(boolean b)
Describe what the method does


pluralise

public static java.lang.String pluralise(java.lang.String name)
Describe what the method does


singularise

public static java.lang.String singularise(java.lang.String name)
Describe what the method does


capitalise

public static java.lang.String capitalise(java.lang.String s)
Describe what the method does


constantNameToVariableName

public static java.lang.String constantNameToVariableName(java.lang.String s)
Converts a constant name to a java variable name (first letter capitalised). VALUE_ADDED -> ValueAdded


naturalNameToVariableName

public static java.lang.String naturalNameToVariableName(java.lang.String s)
Converts a natural name to a java variable name (first letter capitalised). Value added -> ValueAdded


variableNameToConstantName

public static java.lang.String variableNameToConstantName(java.lang.String s)
Converts a java variable name to a containt name. ValueAdded -> VALUE_ADDED


seemsPluralised

private static boolean seemsPluralised(java.lang.String name)
Describe what the method does