Skip to content

Commit 8fa230a

Browse files
committed
Merge pull request #131 from scijava/annotation-value
Adapt instances of AnnotationValue in the annotation processor
2 parents 8e11e2e + 8bbd4f8 commit 8fa230a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/org/scijava/annotations/AbstractIndexWriter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
import java.util.Map.Entry;
4646
import java.util.TreeMap;
4747

48+
import javax.lang.model.element.AnnotationValue;
49+
4850
/**
4951
* Writes annotations as JSON-formatted files.
5052
* <p>
@@ -170,6 +172,9 @@ protected Object adapt(final Object o) {
170172
if (o instanceof Annotation) {
171173
return adapt((Annotation) o);
172174
}
175+
else if (o instanceof AnnotationValue) {
176+
return adapt(((AnnotationValue) o).getValue());
177+
}
173178
else if (o instanceof Enum) {
174179
return adapt((Enum<?>) o);
175180
}

0 commit comments

Comments
 (0)