try {
Class<?> type = entityClass;
String[] parts = path.split("\\.");
for (int index = 0; index < parts.length - 1; index++) type = getType(type, parts[index]);
if (logger.isDebugEnabled()) logger.debug("Obtained super type [" + type + "] for enum at [" + entityClass + "." + path + "]");
Field field = ClassUtils.getField(type, parts[parts.length - 1]);
EntityFilter filter = field.getAnnotation(EntityFilter.class);
String[] values = filter == null ? null : filter.values();
if ((values == null) || (values.length <= 0)) {
Class<?> enumType = field.getType();
if (enumType.isEnum()) {
Object[] constants = enumType.getEnumConstants();
values = new String[constants.length];
for (int index = 0; index < constants.length; index++)
values[index] = enumType.getSimpleName() + "." + constants[index].toString();