private void scanClass(Class clazz, FacesConfigConfig config) {
if (log().isTraceEnabled()) {
log().trace("Scanning class '" + clazz.getName() + "'");
}
Bean bean = (Bean) clazz.getAnnotation(Bean.class);
if (bean != null) {
if (log().isDebugEnabled()) {
log().debug("Class '" + clazz.getName() + "' has an @Bean annotation");
}
ManagedBeanConfig mbc = new ManagedBeanConfig();
mbc.setName(bean.name());
mbc.setType(clazz.getName());
switch (bean.scope()) {
case APPLICATION:
mbc.setScope("application");
break;
case REQUEST:
mbc.setScope("request");