List of utility methods to do Java String Format
Object | toJavaTypes(Class> clazz, String value) to Java Types if (Boolean.class == clazz || boolean.class == clazz) return Boolean.parseBoolean(value); if (Byte.class == clazz || byte.class == clazz) return Byte.parseByte(value); if (Short.class == clazz || short.class == clazz) return Short.parseShort(value); if (Integer.class == clazz || int.class == clazz) return Integer.parseInt(value); ... |
String | toJavaVariable(Class compClass, String name) Converts the given variable name to a valid Java variable. if (name != null) name = name.trim(); if (name == null || name.length() == 0) { name = trimPackage(compClass); name = name.toLowerCase(); StringBuffer sbuff = new StringBuffer(); for (int index = 0; index < name.length(); index++) { ... |