List of utility methods to do Field Name Get
String | capitalizeFieldName(final Field field) capitalize Field Name final String fieldName = field.getName(); return fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); |
String | fieldName(String accessorName) field Name if (accessorName.startsWith("is")) return toLowerCap(accessorName.substring(2)); if (accessorName.startsWith("get")) return toLowerCap(accessorName.substring(3)); if (accessorName.startsWith("set")) return toLowerCap(accessorName.substring(3)); return accessorName; |
String | fieldName(String className, String rawFieldName) field Name return className + "#" + rawFieldName; |
String | fieldName(String fieldName, String propName) Construct a complex field name from its component parts. return fieldName(fieldName, propName, null);
|
String | fieldName(String getsetName) field Name if (!"get".equals(getsetName.substring(0, 3)) && !"set".equals(getsetName.substring(0, 3))) throw new IllegalArgumentException("Invalid getter or setter name : " + getsetName); return String.format("%s%s", getsetName.substring(3, 4).toLowerCase(), getsetName.substring(4)); |
String | fieldName(String name) field Name return name.toLowerCase();
|
String | fieldName(String nodeName) field Name return toJavaIdentifier(nodeName, false);
|
String | fieldName(String underScore) field Name StringBuilder name = new StringBuilder(); underScore = underScore.toLowerCase(); boolean isUnderScore = false; for (int i = 0; i < underScore.length(); i++) { char spell = underScore.charAt(i); if (isUnderScore) { name.append(Character.toUpperCase(spell)); isUnderScore = false; ... |
String | fieldNameFromPropertyName(final String propertyName) Field names are derived from property names by lower casing the first character. String fieldName = null; if (propertyName != null && propertyName.length() > 0) { fieldName = propertyName.substring(0, 1).toLowerCase(); if (propertyName.length() > 1) { fieldName += propertyName.substring(1, propertyName.length()); return fieldName; ... |
boolean | fieldNameMatchesProperty(final String name, final String property) field Name Matches Property return name.equalsIgnoreCase(property);
|