Merge branch '1.5.x'

This commit is contained in:
Stephane Nicoll
2017-12-07 09:43:01 -08:00
3 changed files with 12 additions and 7 deletions

View File

@@ -166,17 +166,24 @@ public class AutoConfigureAnnotationProcessor extends AbstractProcessor {
Object value = entry.getValue().getValue();
if (value instanceof List) {
for (AnnotationValue annotationValue : (List<AnnotationValue>) value) {
result.add(annotationValue.getValue());
result.add(processValue(annotationValue.getValue()));
}
}
else {
result.add(value);
result.add(processValue(value));
}
}
}
return result;
}
private Object processValue(Object value) {
if (value instanceof DeclaredType) {
return getQualifiedName(((DeclaredType) value).asElement());
}
return value;
}
private String getQualifiedName(Element element) {
if (element != null) {
TypeElement enclosingElement = getEnclosingTypeElement(element.asType());