ComponentConfig annotation = clazz.getAnnotation(ComponentConfig.class);
if (annotation != null) {
return new Component[] { toComponentConfig(annotation, clazz) };
}
ComponentConfigs annotations = clazz.getAnnotation(ComponentConfigs.class);
if (annotations != null) {
ComponentConfig[] listAnnotations = annotations.value();
Component[] componentConfigs = new Component[listAnnotations.length];
for (int i = 0; i < componentConfigs.length; i++) {
componentConfigs[i] = toComponentConfig(listAnnotations[i], clazz);
}
return componentConfigs;