checkNotNull(beanDesc);
return (T) beanDesc.getBean();
}
private <T> BeanDesc<T> loadBeanDesc(Class<T> clazz, boolean isRemoteFirst) {
Root root = clazz.getAnnotation(Root.class);
checkNotNull(root, "class %s must have annotation %s", clazz.getName(), Root.class.getName());
String fileName = root.name();
List<Loader> loaders = isRemoteFirst ?
Lists.newArrayList(remoteLoader, localLoader) :
Lists.newArrayList(localLoader, remoteLoader);