/** * Extract the enumeration constants * * @param enumeration is the enumeration * @return is the string with constants */ protected String getEnumerationConstants(Class<?> enumeration) { Object[] constants = enumeration.getEnumConstants(); int idx = 0; StringBuffer strBuff = new StringBuffer(); for (Object konst : constants) { strBuff.append(konst.toString()); if (idx < constants.length - 1) { strBuff.append(", "); } ++idx; } return strBuff.toString(); }