* Any primitive types, conditionals, strings, arrays and name references
* to constant fields will have all been handled by the constant
* expression block above. This name reference can only be for an
* enumerated type.
*/
NameReference nameRef = (NameReference) elementValueExpression;
assert (nameRef.constant == null || nameRef.constant == Constant.NotAConstant);
assert (nameRef.actualReceiverType.isEnum());
Class<?> clazz = getClassLiteral(logger, nameRef.actualReceiverType);
Class<? extends Enum> enumClass = clazz.asSubclass(Enum.class);
String enumName = String.valueOf(nameRef.fieldBinding().name);
elementValue = Enum.valueOf(enumClass, enumName);
} else if (elementValueExpression instanceof Annotation) {
elementValue = createAnnotationInstance(logger, elementValueExpression);
} else {
assert (false);