{
@Override
public String getBeanName(Class<?> clazz)
{
ManagedBean annotation = clazz.getAnnotation(ManagedBean.class);
if (annotation != null) {
// name is set using the annotation
if (annotation.name().length() > 0) {
return annotation.name();
}
// no name, so name is auto generated
else {
String className = clazz.getSimpleName();