Hi
I would like to set the enum value of an annotation in my class processor by calling setEnumValue inside the builder of newAnnotationReference. After finally figuring out how to get hold of EnumerationValueDeclaration, I was met with an exception. Is there something obvious that I'm doing wrong?
JsonInclude is an annotation from Jackson Annotations and has a nested enumeration Include. This is what I tried (I want to use a different value than the default, but you get the idea):
val value = JsonInclude.newAnnotationReference.getEnumValue("value")
val includeAnnotation = JsonInclude.newAnnotationReference [
setEnumValue("value", value)
This is the exception:
java.lang.IllegalArgumentException: com.fasterxml.jackson.annotation.JsonInclude.Include is not applicable at this location. Expected com.fasterxml.jackson.annotation.JsonInclude$Include
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at org.eclipse.xtend.core.macro.ConditionUtils.checkTypeName(ConditionUtils.java:92)
at org.eclipse.xtend.core.macro.declaration.AnnotationReferenceBuildContextImpl.checkType(AnnotationReferenceBuildContextImpl.java:939)
at org.eclipse.xtend.core.macro.declaration.AnnotationReferenceBuildContextImpl._setValue(AnnotationReferenceBuildContextImpl.java:598)
at org.eclipse.xtend.core.macro.declaration.AnnotationReferenceBuildContextImpl.setValue(AnnotationReferenceBuildContextImpl.java:1125)
at org.eclipse.xtend.core.macro.declaration.AnnotationReferenceBuildContextImpl.setValues(AnnotationReferenceBuildContextImpl.java:418)
at org.eclipse.xtend.core.macro.declaration.AnnotationReferenceBuildContextImpl._internalSet(AnnotationReferenceBuildContextImpl.java:385)
at org.eclipse.xtend.core.macro.declaration.AnnotationReferenceBuildContextImpl.setEnumValue(AnnotationReferenceBuildContextImpl.java:216)
Thank you in advance for any help.
-Chris