}
final ClassInfo sessionBeanClassInfo = (ClassInfo) target;
final String ejbName = sessionBeanClassInfo.name().local();
final AnnotationValue nameValue = sessionBeanAnnotation.value("name");
final String beanName = nameValue == null || nameValue.asString().isEmpty() ? ejbName : nameValue.asString();
final SessionBeanMetaData beanMetaData = getEnterpriseBeanMetaData(deploymentUnit, beanName, SessionBeanMetaData.class);
final SessionBeanComponentDescription.SessionBeanType sessionBeanType;
final String beanClassName;
if (beanMetaData != null) {
sessionBeanType = override(annotatedSessionBeanType, descriptionOf(beanMetaData.getSessionType()));
beanClassName = override(sessionBeanClassInfo.name().toString(), beanMetaData.getEjbClass());
} else {
sessionBeanType = annotatedSessionBeanType;
beanClassName = sessionBeanClassInfo.name().toString();
}