use of jakarta.enterprise.inject.spi.AnnotatedType in project myfaces by apache.
the class FacesConfigExtension method beforeBeanDiscovery.
void beforeBeanDiscovery(@Observes BeforeBeanDiscovery event, BeanManager beanManager) {
AnnotatedType beanHolder = beanManager.createAnnotatedType(FacesConfigBeanHolder.class);
event.addAnnotatedType(beanHolder, beanHolder.getJavaClass().getName());
}
use of jakarta.enterprise.inject.spi.AnnotatedType in project myfaces by apache.
the class FacesDataModelExtension method beforeBeanDiscovery.
void beforeBeanDiscovery(@Observes final BeforeBeanDiscovery event, BeanManager beanManager) {
AnnotatedType beanHolder = beanManager.createAnnotatedType(FacesDataModelManager.class);
event.addAnnotatedType(beanHolder, beanHolder.getJavaClass().getName());
}
use of jakarta.enterprise.inject.spi.AnnotatedType in project myfaces by apache.
the class ViewScopeExtension method beforeBeanDiscovery.
void beforeBeanDiscovery(@Observes BeforeBeanDiscovery event, BeanManager beanManager) {
event.addScope(ViewScoped.class, true, true);
// Register ViewScopeBeanHolder as a bean with CDI annotations, so the system
// can take it into account, and use it later when necessary.
AnnotatedType bean = beanManager.createAnnotatedType(ViewScopeContextualStorageHolder.class);
event.addAnnotatedType(bean, bean.getJavaClass().getName());
}
use of jakarta.enterprise.inject.spi.AnnotatedType in project cdi-tck by jakartaee.
the class VerifyValuesTest method testSessionBeanAnnotated.
@Test
@SpecAssertions({ @SpecAssertion(section = PROCESS_BEAN_ATTRIBUTES_EE, id = "bab") })
public void testSessionBeanAnnotated() {
Annotated deltaAnnotated = extension.getAnnotatedMap().get(Delta.class);
assertNotNull(deltaAnnotated);
assertTrue(deltaAnnotated instanceof AnnotatedType);
@SuppressWarnings("unchecked") AnnotatedType<Delta> deltaAnnotatedType = (AnnotatedType<Delta>) deltaAnnotated;
assertEquals(deltaAnnotatedType.getJavaClass(), Delta.class);
assertEquals(deltaAnnotatedType.getMethods().size(), 1);
assertEquals(deltaAnnotatedType.getMethods().iterator().next().getJavaMember().getName(), "foo");
}
use of jakarta.enterprise.inject.spi.AnnotatedType in project cdi-tck by jakartaee.
the class VerifyValuesTest method testManagedBeanAnnotated.
@Test
@SpecAssertions({ @SpecAssertion(section = PROCESS_BEAN_ATTRIBUTES, id = "baa") })
public void testManagedBeanAnnotated() {
Annotated alphaAnnotated = extension.getAnnotatedMap().get(Alpha.class);
assertNotNull(alphaAnnotated);
assertTrue(alphaAnnotated instanceof AnnotatedType);
@SuppressWarnings("unchecked") AnnotatedType<Alpha> alphaAnnotatedType = (AnnotatedType<Alpha>) alphaAnnotated;
assertEquals(alphaAnnotatedType.getJavaClass(), Alpha.class);
assertEquals(alphaAnnotatedType.getMethods().size(), 0);
}
Aggregations