protected void addSyntheticAnnotatedType(AnnotatedType<?> type, String id) { AnnotatedTypeValidator.validateAnnotatedType(type); if (type.getJavaClass().isAnnotation() || Beans.isVetoed(type)) { return; } storeSyntheticAnnotatedType(getOrCreateBeanDeployment(type.getJavaClass()), type, id); }
protected void addSyntheticAnnotatedType(AnnotatedType<?> type, String id) { AnnotatedTypeValidator.validateAnnotatedType(type); if (type.getJavaClass().isAnnotation() || Beans.isVetoed(type)) { return; } storeSyntheticAnnotatedType(getOrCreateBeanDeployment(type.getJavaClass()), type, id); }
protected void addSyntheticAnnotatedType(AnnotatedType<?> type, String id) { AnnotatedTypeValidator.validateAnnotatedType(type); if (type.getJavaClass().isAnnotation() || Beans.isVetoed(type)) { return; } storeSyntheticAnnotatedType(getOrCreateBeanDeployment(type.getJavaClass()), type, id); }
protected void addSyntheticAnnotatedType(AnnotatedType<?> type, String id) { AnnotatedTypeValidator.validateAnnotatedType(type); if (type.getJavaClass().isAnnotation() || Beans.isVetoed(type)) { return; } storeSyntheticAnnotatedType(getOrCreateBeanDeployment(type.getJavaClass()), type, id); }
protected void addSyntheticAnnotatedType(AnnotatedType<?> type, String id) { AnnotatedTypeValidator.validateAnnotatedType(type); if (type.getJavaClass().isAnnotation() || Beans.isVetoed(type)) { return; } storeSyntheticAnnotatedType(getOrCreateBeanDeployment(type.getJavaClass()), type, id); }
protected void addSyntheticAnnotatedType(AnnotatedType<?> type, String id) { AnnotatedTypeValidator.validateAnnotatedType(type); if (type.getJavaClass().isAnnotation() || Beans.isVetoed(type)) { return; } storeSyntheticAnnotatedType(getOrCreateBeanDeployment(type.getJavaClass()), type, id); }
protected <T> SlimAnnotatedType<T> internalLoadAnnotatedType(Class<T> clazz, String bdaId) { // do not load if clazz is null, an annotation or anonymous/local class if (clazz != null && !clazz.isAnnotation() && !clazz.isAnonymousClass() && !clazz.isLocalClass()) { try { if (!Beans.isVetoed(clazz)) { // may throw ArrayStoreException - see bug http://bugs.sun.com/view_bug.do?bug_id=7183985 containerLifecycleEvents.preloadProcessAnnotatedType(clazz); try { return classTransformer.getBackedAnnotatedType(clazz, bdaId); } catch (ResourceLoadingException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } } catch (ArrayStoreException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } return null; }
protected <T> SlimAnnotatedType<T> internalLoadAnnotatedType(Class<T> clazz, String bdaId) { // do not load if clazz is null, an annotation or anonymous/local class if (clazz != null && !clazz.isAnnotation() && !clazz.isAnonymousClass() && !clazz.isLocalClass()) { try { if (!Beans.isVetoed(clazz)) { // may throw ArrayStoreException - see bug http://bugs.sun.com/view_bug.do?bug_id=7183985 containerLifecycleEvents.preloadProcessAnnotatedType(clazz); try { return classTransformer.getBackedAnnotatedType(clazz, bdaId); } catch (ResourceLoadingException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } } catch (ArrayStoreException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } return null; }
protected <T> SlimAnnotatedType<T> internalLoadAnnotatedType(Class<T> clazz, String bdaId) { // do not load if clazz is null, an annotation or anonymous/local class if (clazz != null && !clazz.isAnnotation() && !clazz.isAnonymousClass() && !clazz.isLocalClass()) { try { if (!Beans.isVetoed(clazz)) { // may throw ArrayStoreException - see bug http://bugs.sun.com/view_bug.do?bug_id=7183985 containerLifecycleEvents.preloadProcessAnnotatedType(clazz); try { return classTransformer.getBackedAnnotatedType(clazz, bdaId); } catch (ResourceLoadingException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } } catch (ArrayStoreException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } return null; }
protected <T> SlimAnnotatedType<T> internalLoadAnnotatedType(Class<T> clazz, String bdaId) { // do not load if clazz is null, an annotation or anonymous/local class if (clazz != null && !clazz.isAnnotation() && !clazz.isAnonymousClass() && !clazz.isLocalClass()) { try { if (!Beans.isVetoed(clazz)) { // may throw ArrayStoreException - see bug http://bugs.sun.com/view_bug.do?bug_id=7183985 containerLifecycleEvents.preloadProcessAnnotatedType(clazz); try { return classTransformer.getBackedAnnotatedType(clazz, bdaId); } catch (ResourceLoadingException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } } catch (ArrayStoreException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } return null; }
protected <T> SlimAnnotatedType<T> internalLoadAnnotatedType(Class<T> clazz, String bdaId) { // do not load if clazz is null, an annotation or anonymous/local class if (clazz != null && !clazz.isAnnotation() && !clazz.isAnonymousClass() && !clazz.isLocalClass()) { try { if (!Beans.isVetoed(clazz)) { // may throw ArrayStoreException - see bug http://bugs.sun.com/view_bug.do?bug_id=7183985 containerLifecycleEvents.preloadProcessAnnotatedType(clazz); try { return classTransformer.getBackedAnnotatedType(clazz, bdaId); } catch (ResourceLoadingException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } } catch (ArrayStoreException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } return null; }
protected <T> SlimAnnotatedType<T> loadAnnotatedType(Class<T> clazz, String bdaId) { if (clazz != null && !clazz.isAnnotation()) { try { if (!Beans.isVetoed(clazz)) { // may throw ArrayStoreException - see bug http://bugs.sun.com/view_bug.do?bug_id=7183985 containerLifecycleEvents.preloadProcessAnnotatedType(clazz); try { return classTransformer.getBackedAnnotatedType(clazz, bdaId); } catch (ResourceLoadingException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } } catch (ArrayStoreException e) { missingDependenciesRegistry.handleResourceLoadingException(clazz.getName(), e); } } return null; }
@Override public void createSessionBeans(BeanDeployerEnvironment environment, SetMultimap<Class<?>, SlimAnnotatedType<?>> types, BeanManagerImpl manager) { final ClassTransformer transformer = manager.getServices().get(ClassTransformer.class); for (InternalEjbDescriptor<?> ejbDescriptor : getEjbDescriptors()) { if (environment.isVetoed(ejbDescriptor.getBeanClass()) || Beans.isVetoed(ejbDescriptor.getBeanClass())) { continue; } if (ejbDescriptor.isSingleton() || ejbDescriptor.isStateful() || ejbDescriptor.isStateless()) { Set<SlimAnnotatedType<?>> classes = types.get(ejbDescriptor.getBeanClass()); if (!classes.isEmpty()) { for (SlimAnnotatedType<?> annotatedType : classes) { createSessionBean(ejbDescriptor, annotatedType, environment, manager, transformer); } } else { createSessionBean(ejbDescriptor, environment, manager, transformer); } } } }
@Override protected void doWork(InternalEjbDescriptor<?> descriptor) { if (!getEnvironment().isVetoed(descriptor.getBeanClass()) && !Beans.isVetoed(descriptor.getBeanClass())) { if (descriptor.isSingleton() || descriptor.isStateful() || descriptor.isStateless()) { if (otherWeldClasses.get(descriptor.getBeanClass()) != null) { for (SlimAnnotatedType<?> annotatedType : otherWeldClasses.get(descriptor.getBeanClass())) { EnhancedAnnotatedType<?> weldClass = classTransformer.getEnhancedAnnotatedType(annotatedType); createSessionBean(descriptor, Reflections.<EnhancedAnnotatedType> cast(weldClass)); } } else { createSessionBean(descriptor); } } } } });
public void createClassBeans() { SetMultimap<Class<?>, SlimAnnotatedType<?>> otherWeldClasses = SetMultimap.newConcurrentSetMultimap(); for (SlimAnnotatedTypeContext<?> ctx : getEnvironment().getAnnotatedTypes()) { createClassBean(ctx.getAnnotatedType(), otherWeldClasses); } // create session beans for (InternalEjbDescriptor<?> ejbDescriptor : getEnvironment().getEjbDescriptors()) { if (getEnvironment().isVetoed(ejbDescriptor.getBeanClass()) || Beans.isVetoed(ejbDescriptor.getBeanClass())) { continue; } if (ejbDescriptor.isSingleton() || ejbDescriptor.isStateful() || ejbDescriptor.isStateless()) { if (otherWeldClasses.get(ejbDescriptor.getBeanClass()) != null) { for (SlimAnnotatedType<?> annotatedType : otherWeldClasses.get(ejbDescriptor.getBeanClass())) { EnhancedAnnotatedType<?> weldClass = classTransformer.getEnhancedAnnotatedType(annotatedType); createSessionBean(ejbDescriptor, Reflections.<EnhancedAnnotatedType> cast(weldClass)); } } else { createSessionBean(ejbDescriptor); } } } }