public void registerAnnotatedTypes() { for (SlimAnnotatedTypeContext<?> ctx : getEnvironment().getAnnotatedTypes()) { annotatedTypeStore.put(ctx.getAnnotatedType()); } }
public void registerAnnotatedTypes() { for (SlimAnnotatedTypeContext<?> ctx : getEnvironment().getAnnotatedTypes()) { annotatedTypeStore.put(ctx.getAnnotatedType()); } }
public void registerAnnotatedTypes() { for (SlimAnnotatedTypeContext<?> ctx : getEnvironment().getAnnotatedTypes()) { annotatedTypeStore.put(ctx.getAnnotatedType()); } }
public void registerAnnotatedTypes() { for (SlimAnnotatedTypeContext<?> ctx : getEnvironment().getAnnotatedTypes()) { annotatedTypeStore.put(ctx.getAnnotatedType()); } }
public void registerAnnotatedTypes() { for (SlimAnnotatedTypeContext<?> ctx : getEnvironment().getAnnotatedTypes()) { annotatedTypeStore.put(ctx.getAnnotatedType()); } }
public void registerAnnotatedTypes() { for (SlimAnnotatedTypeContext<?> ctx : getEnvironment().getAnnotatedTypes()) { annotatedTypeStore.put(ctx.getAnnotatedType()); } }
protected <T> void createNewManagedBean(EnhancedAnnotatedType<T> annotatedClass) { // TODO resolve existing beans first slimAnnotatedTypeStore.put(annotatedClass.slim()); getEnvironment().addManagedBean(NewManagedBean.of(BeanAttributesFactory.forNewManagedBean(annotatedClass, manager), annotatedClass, manager)); }
private <T> SessionBean<T> createNewSessionBean(EnhancedAnnotatedType<?> type, InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl beanManager, SlimAnnotatedTypeStore store) { store.put(type.slim()); final BeanAttributes<T> attributes = Reflections.cast(SessionBeans.createBeanAttributesForNew(type, ejbDescriptor, beanManager, type.getJavaClass())); return NewSessionBean.of(attributes, ejbDescriptor, beanManager); }
protected <T> SessionBean<T> createSessionBean(InternalEjbDescriptor<T> descriptor) { EnhancedAnnotatedType<T> type = classTransformer.getEnhancedAnnotatedType(descriptor.getBeanClass(), getManager().getId()); slimAnnotatedTypeStore.put(type.slim()); return createSessionBean(descriptor, type); } protected <T> SessionBean<T> createSessionBean(InternalEjbDescriptor<T> descriptor, EnhancedAnnotatedType<T> weldClass) {
protected <T> SessionBean<T> createSessionBean(InternalEjbDescriptor<T> descriptor, BeanDeployerEnvironment environment, BeanManagerImpl manager, ClassTransformer transformer) { final SlimAnnotatedType<T> type = transformer.getBackedAnnotatedType(descriptor.getBeanClass(), manager.getId()); manager.getServices().get(SlimAnnotatedTypeStore.class).put(type); return createSessionBean(descriptor, type, environment, manager, transformer); }
protected <T> void createNewManagedBean(Class<T> clazz, Type type) { EnhancedAnnotatedType<T> enhancedType = classTransformer.getEnhancedAnnotatedType(clazz, type, manager.getId()); slimAnnotatedTypeStore.put(enhancedType.slim()); getEnvironment().addManagedBean(NewManagedBean.of(BeanAttributesFactory.forNewManagedBean(enhancedType, manager), enhancedType, manager)); }
protected <T> void createNewManagedBean(Class<T> clazz, Type type) { EnhancedAnnotatedType<T> enhancedType = classTransformer.getEnhancedAnnotatedType(clazz, type, manager.getId()); slimAnnotatedTypeStore.put(enhancedType.slim()); getEnvironment().addManagedBean(NewManagedBean.of(BeanAttributesFactory.forNewManagedBean(enhancedType, manager), enhancedType, manager)); }
protected <T> void createNewManagedBean(Class<T> clazz, Type type) { EnhancedAnnotatedType<T> enhancedType = classTransformer.getEnhancedAnnotatedType(clazz, type, manager.getId()); slimAnnotatedTypeStore.put(enhancedType.slim()); getEnvironment().addManagedBean(NewManagedBean.of(BeanAttributesFactory.forNewManagedBean(enhancedType, manager), enhancedType, manager)); }
protected <T> void createNewManagedBean(Class<T> clazz, Type type) { EnhancedAnnotatedType<T> enhancedType = classTransformer.getEnhancedAnnotatedType(clazz, type, manager.getId()); slimAnnotatedTypeStore.put(enhancedType.slim()); getEnvironment().addManagedBean(NewManagedBean.of(BeanAttributesFactory.forNewManagedBean(enhancedType, manager), enhancedType, manager)); }
protected <T> void createNewSessionBean(InternalEjbDescriptor<T> ejbDescriptor, BeanAttributes<?> originalAttributes, EnhancedAnnotatedType<?> type) { slimAnnotatedTypeStore.put(type.slim()); BeanAttributes<T> attributes = Reflections.cast(BeanAttributesFactory.forNewSessionBean(originalAttributes, type.getJavaClass())); getEnvironment().addSessionBean(NewSessionBean.of(attributes, ejbDescriptor, manager)); }
protected <T> void createNewManagedBean(Class<T> clazz, Type type) { EnhancedAnnotatedType<T> enhancedType = classTransformer.getEnhancedAnnotatedType(clazz, type, manager.getId()); slimAnnotatedTypeStore.put(enhancedType.slim()); getEnvironment().addManagedBean(NewManagedBean.of(BeanAttributesFactory.forNewManagedBean(enhancedType, manager), enhancedType, manager)); }
public static <T> EnhancedAnnotatedType<T> getEjbImplementationClass(InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl manager, EnhancedAnnotatedType<T> componentType) { if (ejbDescriptor.getBeanClass().equals(ejbDescriptor.getImplementationClass())) { // no special implementation class is used return componentType; } ClassTransformer transformer = manager.getServices().get(ClassTransformer.class); EnhancedAnnotatedType<T> implementationClass = cast(transformer.getEnhancedAnnotatedType(ejbDescriptor.getImplementationClass(), manager.getId())); manager.getServices().get(SlimAnnotatedTypeStore.class).put(implementationClass.slim()); return implementationClass; }
public static <T> EnhancedAnnotatedType<T> getEjbImplementationClass(EjbDescriptor<T> descriptor, BeanManagerImpl manager, EnhancedAnnotatedType<T> componentType) { InternalEjbDescriptor<T> ejbDescriptor = InternalEjbDescriptor.of(descriptor); if (ejbDescriptor.getBeanClass().equals(ejbDescriptor.getImplementationClass())) { // no special implementation class is used return componentType; } ClassTransformer transformer = manager.getServices().get(ClassTransformer.class); EnhancedAnnotatedType<T> implementationClass = cast(transformer.getEnhancedAnnotatedType(ejbDescriptor.getImplementationClass(), manager.getId())); manager.getServices().get(SlimAnnotatedTypeStore.class).put(implementationClass.slim()); return implementationClass; }
@Override protected void storeSyntheticAnnotatedType(BeanDeployment deployment, AnnotatedType<?> type, String id) { SlimAnnotatedType<?> annotatedType = transformer.getUnbackedAnnotatedType(type, getBeanManager().getId(), id); Extension extension = getReceiver(); SlimAnnotatedTypeContext<?> annotatedTypeContext = SlimAnnotatedTypeContext.of(annotatedType, extension); ProcessAnnotatedTypeImpl<?> event = events.fireProcessAnnotatedType(getBeanManager(), annotatedTypeContext); if (event == null) { deployment.getBeanDeployer().getEnvironment().addAnnotatedType(annotatedTypeContext); store.put(annotatedType); } else if (event.isVeto()) { return; } else { annotatedType = event.getResultingAnnotatedType(); deployment.getBeanDeployer().getEnvironment().addSyntheticAnnotatedType(annotatedType, extension); store.put(annotatedType); } } }
@Override protected void storeSyntheticAnnotatedType(BeanDeployment deployment, AnnotatedType<?> type, String id) { SlimAnnotatedType<?> annotatedType = transformer.getUnbackedAnnotatedType(type, getBeanManager().getId(), id); Extension extension = getReceiver(); SlimAnnotatedTypeContext<?> annotatedTypeContext = SlimAnnotatedTypeContext.of(annotatedType, extension); ProcessAnnotatedTypeImpl<?> event = events.fireProcessAnnotatedType(getBeanManager(), annotatedTypeContext); if (event == null) { deployment.getBeanDeployer().getEnvironment().addAnnotatedType(annotatedTypeContext); store.put(annotatedType); } else if (event.isVeto()) { return; } else { annotatedType = event.getResultingAnnotatedType(); deployment.getBeanDeployer().getEnvironment().addSyntheticAnnotatedType(annotatedType, extension); store.put(annotatedType); } } }