List of utility methods to do Field Name Get
String | fieldNameToConstant(String fieldname) field Name To Constant return camelCaseNameToConstant(fieldname);
|
String | fieldNameToMethodName(String methodPrefix, String fieldName) field name to method name return fieldNameToMethodName(methodPrefix, fieldName, false);
|
String | fieldNameToPath(String fieldName) Converts a fieldName into a readable path final StringBuilder path = new StringBuilder(); boolean lastUpper = true; for (char c : fieldName.toCharArray()) { if (c == '_') { lastUpper = true; path.append('.'); continue; if (Character.isUpperCase(c)) { c = Character.toLowerCase(c); if (!lastUpper) { lastUpper = true; path.append('-'); } else { lastUpper = false; path.append(c); return path.toString(); |