Here you can find the source of toPluralForm(String propertyName)
public static String toPluralForm(String propertyName)
//package com.java2s; //License from project: Apache License public class Main { public static String toPluralForm(String propertyName) { String endString;/*from ww w. j a v a2 s .c o m*/ if (propertyName.endsWith("Parson") || propertyName.endsWith("parson")) { propertyName = propertyName.replace("Parson", ""); propertyName = propertyName.replace("parson", ""); if ("".equals(propertyName)) { endString = "people"; } else { endString = "People"; } } else if (propertyName.endsWith("ch") || propertyName.endsWith("th") || propertyName.endsWith("s")) { endString = "es"; } else if (propertyName.endsWith("y") && propertyName.length() > 1) { String s = propertyName.substring(propertyName.length() - 1, propertyName.length()); if ("a".equals(s) || "i".equals(s) || "u".equals(s) || "e".equals(s) || "o".equals(s)) { endString = "s"; } else { propertyName = propertyName.substring(0, propertyName.length() - 1); endString = "ies"; } } else { endString = "s"; } return propertyName + endString; } }