if (currentExpression instanceof NullLiteral) {
scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, currentExpression, true);
} else if (currentExpression instanceof NameReference) {
NameReference nameReference = (NameReference) currentExpression;
final Binding nameReferenceBinding = nameReference.binding;
if (nameReferenceBinding.kind() == Binding.FIELD) {
FieldBinding fieldBinding = (FieldBinding) nameReferenceBinding;
if (!fieldBinding.declaringClass.isEnum()) {
scope.problemReporter().annotationValueMustBeConstant(this.binding.declaringClass, this.name, currentExpression, true);
}
}