*
* @param beanDef the component bean definition to resolve
* @return the scope meta data for the given bean definition.
*/
public ScopeMetadata resolveScopeMetadata(BeanDefinition beanDef) {
ScopeMetadata sm = new ScopeMetadata();
try {
Class beanClass = ClickUtils.classForName(beanDef.getBeanClassName());
if (Page.class.isAssignableFrom(beanClass)) {
sm.setScopeName(ConfigurableBeanFactory.SCOPE_PROTOTYPE);
} else {
// TODO: see whether we can determine the default scope definition
// from the beanDef and return this instead.
sm.setScopeName(ConfigurableBeanFactory.SCOPE_SINGLETON);
}
return sm;
} catch (Exception e) {