in src/main/java/org/apache/sling/maven/bundlesupport/GenerateAdapterMetadataMojo.java [153:176]
private void parseAdaptableAnnotation(
AnnotationParameterValueList annotationParameterValues,
String annotatedClassName,
final Map<String, Object> descriptor)
throws JsonException {
// two parameters: adaptableClass and Adapter[] adapters
String adaptableClassName = ((AnnotationClassRef)
annotationParameterValues.get("adaptableClass").getValue())
.getName();
Object[] adapters = (Object[]) annotationParameterValues.get("adapters").getValue();
Map<String, Object> adaptableDescription;
if (descriptor.containsKey(adaptableClassName)) {
adaptableDescription = (Map<String, Object>) descriptor.get(adaptableClassName);
} else {
adaptableDescription = new HashMap<>();
descriptor.put(adaptableClassName, adaptableDescription);
}
for (final Object adapter : adapters) {
parseAdapterAnnotation(
((AnnotationInfo) adapter).getParameterValues(), annotatedClassName, adaptableDescription);
}
}