preparer = this.sharedPreparers.get(name);
if (preparer == null) {
try {
Class<?> beanClass = context.getClassLoader().loadClass(name);
if (!ViewPreparer.class.isAssignableFrom(beanClass)) {
throw new PreparerException(
"Invalid preparer class [" + name + "]: does not implement ViewPreparer interface");
}
preparer = (ViewPreparer) context.getAutowireCapableBeanFactory().createBean(beanClass);
this.sharedPreparers.put(name, preparer);
}