return config;
}
List<BaseComponent<?, ?>> components = new ArrayList<BaseComponent<?, ?>>();
List<?> list = (List<?>) config;
AuraContext context = Aura.getContextService().getCurrentContext();
if (list != null) {
int idx = 0;
for (Object defRef : list) {
if (defRef instanceof BaseComponent) {
components.add((BaseComponent<?, ?>) defRef);
} else if (defRef instanceof ComponentDefRef) {
context.getInstanceStack().setAttributeIndex(idx);
components.add(((ComponentDefRef) defRef).newInstance(valueProvider));
context.getInstanceStack().clearAttributeIndex(idx);
idx += 1;
} else {
throw new InvalidDefinitionException(String.format("Expected Component, recieved %s", defRef
.getClass().getName()), getLocation());
}