|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.sahits.codegen.util.ConvenientCodegen
public final class ConvenientCodegen
This class provides convenient methods for the code generation to convert different parts of a model.
| Constructor Summary | |
|---|---|
ConvenientCodegen()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
camelCase(java.lang.String s,
java.lang.String delimiter)
Camel-case a string that is divided by the designated delimiter |
static java.lang.String |
camelCaseLowerCaseFirst(java.lang.String s,
java.lang.String delimiter)
Camale-case a string that is divided by the designated delimiter with a lower case start. |
static java.lang.String |
getBoxingClassParsingMethodName(java.lang.Class type)
Retrieve the method name of the boxing class |
static java.lang.String |
getBoxingClassShortName(java.lang.Class type)
Retrieve the short name of the boxing class |
static java.lang.String |
getClassShortName(DataBaseTableField dbtf)
Extract the class name from the class declaration |
static java.lang.String |
getSimpleClassName(java.lang.Class c)
Retrieve the simple representation of a class |
static java.lang.String |
getSimpleClassName(java.lang.String c)
Retrieve the simple representation of a class |
static boolean |
isBoxingType(java.lang.Class type)
Check whether the type is of a primitive type that needs boxing such as byte, boolean, double, float, int, long, short, char |
static boolean |
isPrimitiveClass(java.lang.Class c)
Check whether the class belongs to the java.lang package |
static boolean |
isPrimitiveClass(java.lang.String c)
Check whether the class belongs to the java.lang package |
static boolean |
isPrimitiveType(DataBaseTableField dbtf)
Check weather the type is a primitive type, meaning a type defined in the package java.lang |
static java.lang.String |
toLowerCaseFirst(java.lang.String s)
Make the first letter of a string lower case |
static java.lang.String |
toName(java.lang.String name,
java.lang.String delimiter)
Take a name and convert it to a convenient java name. |
static java.lang.String |
toPackageDefinition(java.lang.String packageName)
Convert the package name into a valid package definition. |
static java.lang.String |
toUpperCaseFirst(java.lang.String s)
Make the first letter of a string upper case |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConvenientCodegen()
| Method Detail |
|---|
public static java.lang.String toPackageDefinition(java.lang.String packageName)
packageName - name of the package
public static java.lang.String getSimpleClassName(java.lang.Class c)
c - class to be represented
public static java.lang.String getSimpleClassName(java.lang.String c)
c - name of the class
public static java.lang.String toName(java.lang.String name,
java.lang.String delimiter)
name - to be converteddelimiter - string or null
public static boolean isPrimitiveClass(java.lang.String c)
c - name of the class
public static boolean isPrimitiveClass(java.lang.Class c)
c - class to be checked
public static java.lang.String camelCase(java.lang.String s,
java.lang.String delimiter)
s - input stringdelimiter - parting the words in the string
public static java.lang.String camelCaseLowerCaseFirst(java.lang.String s,
java.lang.String delimiter)
s - input stringdelimiter - parting the words in the string
public static java.lang.String toLowerCaseFirst(java.lang.String s)
s - input String
public static java.lang.String toUpperCaseFirst(java.lang.String s)
s - input String
public static java.lang.String getClassShortName(DataBaseTableField dbtf)
dbtf - Field declaration
public static boolean isPrimitiveType(DataBaseTableField dbtf)
dbtf - Field to be checked
public static boolean isBoxingType(java.lang.Class type)
type - class type to be checked
public static java.lang.String getBoxingClassShortName(java.lang.Class type)
type - class type of byte, boolean, double, float, int, long, short, char
public static java.lang.String getBoxingClassParsingMethodName(java.lang.Class type)
type - class type of byte, boolean, double, float, int, long, short, char
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||