@Override protected void defineName() if (getAnnotated().isAnnotationPresent(Specializes.class)) AnnotatedType<? super C> annotatedToSpecialize = getAnnotated(); if (superclass.equals(Object.class)) throw new WebBeansConfigurationException("@Specialized Class : " + getAnnotated().getJavaClass().getName() + " must not directly extend Object.class"); defineName(annotatedToSpecialize, () -> getManagedBeanDefaultName(finalAnnotatedToSpecialize)); defineName(getAnnotated(), () -> getManagedBeanDefaultName(getAnnotated())); if (getAnnotated().getJavaClass().isAnnotationPresent(Named.class)) throw new WebBeansConfigurationException("@Specialized Class : " + getAnnotated().getJavaClass().getName() + " may not explicitly declare a bean name");
@Override protected void defineScope() { defineScope(getAnnotated().getJavaClass(), onlyScopedBeans, WebBeansLoggerFacade.getTokenString(OWBLogConst.TEXT_MB_IMPL) + getAnnotated().getJavaClass().getName() + WebBeansLoggerFacade.getTokenString(OWBLogConst.TEXT_SAME_SCOPE)); }
@Override protected AnnotatedType<? super C> getSuperAnnotated() { AnnotatedType<? super C> annotatedType = getAnnotated(); do { Class<? super C> superclass = annotatedType.getJavaClass().getSuperclass(); if (superclass == null || superclass.equals(Object.class)) { return null; } annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(superclass); } while (annotatedType.getAnnotation(Specializes.class) != null); return annotatedType; } }
public <T> BeanAttributesBuilder<T, AnnotatedType<T>> newBeanAttibutes(AnnotatedType<T> annotatedType, boolean onlyScopedBeans) { return new AnnotatedTypeBeanAttributesBuilder<>(webBeansContext, annotatedType, onlyScopedBeans); }
@Override protected void defineNullable() { defineNullable(false); }