Examples of DependentScopeLiteral


Examples of org.apache.webbeans.annotation.DependentScopeLiteral

        Asserts.assertNotNull(clazz, "clazz parameter can not be null");
       
        JmsComponentImpl<T> component = new JmsComponentImpl<T>(model,clazz);
       
        component.addApiType(clazz);
        component.setImplScopeType(new DependentScopeLiteral());
       
        Annotation[] anns = model.getBindings();
       
        for(Annotation a : anns)
        {
View Full Code Here

Examples of org.apache.webbeans.annotation.DependentScopeLiteral

        else
        {
            throw new WebBeansConfigurationException("@New annotation on type : " + clazz.getName() + " must defined as a simple or an enterprise web bean");
        }

        comp.setImplScopeType(new DependentScopeLiteral());
        comp.addBindingType(new NewLiteral());
        comp.setName(null);
        comp.addApiType(clazz);
        comp.addApiType(Object.class);
        comp.setType(new ProductionLiteral());
View Full Code Here

Examples of org.apache.webbeans.annotation.DependentScopeLiteral

        {
            component.getInterceptorStack().addAll(interceptorList);  
        }
       
       
        comp.setImplScopeType(new DependentScopeLiteral());
        comp.addBindingType(new NewLiteral());
        comp.setType(new StandardLiteral());
        comp.setName(null);
       
View Full Code Here

Examples of org.apache.webbeans.annotation.DependentScopeLiteral

            throw new WebBeansException("No constructor found in EventImpl class", e);
        }

        component.setConstructor(constructor);
        component.setType(new StandardLiteral());
        component.setImplScopeType(new DependentScopeLiteral());                     

        return component;
    }
View Full Code Here

Examples of org.apache.webbeans.annotation.DependentScopeLiteral

    public static ManagerComponentImpl getManagerComponent()
    {
        ManagerComponentImpl managerComponent = new ManagerComponentImpl();

        managerComponent.setImplScopeType(new DependentScopeLiteral());
        managerComponent.setType(new StandardLiteral());
        managerComponent.addBindingType(new CurrentLiteral());
        managerComponent.addApiType(Manager.class);
        managerComponent.addApiType(Object.class);
View Full Code Here

Examples of org.apache.webbeans.annotation.DependentScopeLiteral

       
        instanceComponent.addApiType(clazz);
        instanceComponent.addApiType(Object.class);
       
        DefinitionUtil.defineBindingTypes(instanceComponent, obtainsBindings);
        instanceComponent.setImplScopeType(new DependentScopeLiteral());
        instanceComponent.setType(new StandardLiteral());
        instanceComponent.setName(null);
       
       
        return instanceComponent;
View Full Code Here

Examples of org.apache.webbeans.annotation.DependentScopeLiteral

        if (!found)
        {
            Set<Annotation> stereos = component.getStereotypes();
            if (stereos.size() == 0)
            {
                component.setImplScopeType(new DependentScopeLiteral());
            }
            else
            {
                Annotation defined = null;
                Set<Annotation> anns = component.getStereotypes();
                for (Annotation stero : anns)
                {
                    if (AnnotationUtil.isMetaAnnotationExist(stero.annotationType().getDeclaredAnnotations(), ScopeType.class))
                    {
                        Annotation next = AnnotationUtil.getMetaAnnotations(stero.annotationType().getDeclaredAnnotations(), ScopeType.class)[0];

                        if (defined == null)
                        {
                            defined = next;
                        }
                        else
                        {
                            if (!defined.equals(next))
                            {
                                throw new WebBeansConfigurationException(exceptionMessage);
                            }
                        }
                    }
                }

                if (defined != null)
                {
                    component.setImplScopeType(defined);
                }
                else
                {
                    component.setImplScopeType(new DependentScopeLiteral());
                }
            }
        }

    }
View Full Code Here

Examples of org.apache.webbeans.annotation.DependentScopeLiteral

    {
        super(WebBeansType.INJECTIONPOINT,InjectionPoint.class);
        this.injectionPoint = injectionPoint;
       
        addBindingType(new CurrentLiteral());
        setImplScopeType(new DependentScopeLiteral());
        setType(new StandardLiteral());
        addApiType(InjectionPoint.class);
        addApiType(Object.class);
    }
View Full Code Here

Examples of org.apache.webbeans.annotation.DependentScopeLiteral

                       
                        ResourceBean<X,Annotation> resourceBean = new ResourceBean((Class<X>)field.getType(),bean, resourceRef);
                       
                        resourceBean.getTypes().addAll(annotatedField.getTypeClosure());
                        DefinitionUtil.defineQualifiers(resourceBean, anns);                   
                        resourceBean.setImplScopeType(new DependentScopeLiteral());
                        resourceBean.setProducerField(field);
                       
                        producerBeans.add(resourceBean);                                           
                    }
                }
View Full Code Here

Examples of org.apache.webbeans.annotation.DependentScopeLiteral

        if (!found)
        {
            Set<Class<? extends Annotation>> stereos = component.getStereotypes();
            if (stereos.size() == 0)
            {
                component.setImplScopeType(new DependentScopeLiteral());
            }
            else
            {
                Annotation defined = null;
                Set<Class<? extends Annotation>> anns = component.getStereotypes();
                for (Class<? extends Annotation> stero : anns)
                {
                    boolean containsNormal = AnnotationUtil.hasMetaAnnotation(stero.getDeclaredAnnotations(), NormalScope.class);
                   
                    if (AnnotationUtil.hasMetaAnnotation(stero.getDeclaredAnnotations(), NormalScope.class) ||
                            AnnotationUtil.hasMetaAnnotation(stero.getDeclaredAnnotations(), Scope.class))
                    {                       
                        Annotation next = null;
                       
                        if(containsNormal)
                        {
                            next = AnnotationUtil.getMetaAnnotations(stero.getDeclaredAnnotations(), NormalScope.class)[0];
                        }
                        else
                        {
                            next = AnnotationUtil.getMetaAnnotations(stero.getDeclaredAnnotations(), Scope.class)[0];
                        }

                        if (defined == null)
                        {
                            defined = next;
                        }
                        else
                        {
                            if (!defined.equals(next))
                            {
                                throw new WebBeansConfigurationException(exceptionMessage);
                            }
                        }
                    }
                }

                if (defined != null)
                {
                    component.setImplScopeType(defined);
                }
                else
                {
                    component.setImplScopeType(new DependentScopeLiteral());
                }
            }
        }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.