Package org.apache.webbeans.annotation

Examples of org.apache.webbeans.annotation.DefaultLiteral


        else
        {
            if (qualifiers.length == 0)
            {
                qualifiers = new Annotation[]{new DefaultLiteral()};
                currentQualifier = true;
            }
        }

        if (injectionPointType.equals(Object.class) && currentQualifier)
View Full Code Here


                boolean observesAnnotation = false;

                if (annot.length == 0)
                {
                    annot = new Annotation[1];
                    annot[0] = new DefaultLiteral();
                }
                else
                {
                    for (Annotation observersAnnot : annot)
                    {
View Full Code Here

            listAnnot.add(ann);
        }

        if (listAnnot.isEmpty())
        {
            listAnnot.add(new DefaultLiteral());
        }

        while (it.hasNext())
        {
            decorator = (WebBeansDecorator<?>) it.next();
View Full Code Here

       

        // No-binding annotation
        if (component.getQualifiers().size() == 0 )
        {
            component.addQualifier(new DefaultLiteral());
        }
        else if(component.getQualifiers().size() == 1)
        {
            Annotation annot = component.getQualifiers().iterator().next();
            if(annot.annotationType().equals(Named.class))
            {
                component.addQualifier(new DefaultLiteral());
            }
        }
       
        //Add @Any support
        if(!AnnotationUtil.hasAnyQualifier(component))
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    public Conversation getConversationBeanReference()
    {
        BeanManager beanManager = webBeansContext.getBeanManagerImpl();
        Bean<Conversation> bean = (Bean<Conversation>)beanManager.getBeans(Conversation.class, new DefaultLiteral()).iterator().next();
        Conversation conversation =(Conversation) beanManager.getReference(bean, Conversation.class, beanManager.createCreationalContext(bean));

        return conversation;
    }
View Full Code Here

        catch (NamingException e)
        {
            //fallback for a servlet container
            BeanManagerImpl beanManager = getWebBeansContext().getBeanManagerImpl();

            Iterator<Bean<?>> beansIterator = beanManager.getBeans(resourceType, new DefaultLiteral()).iterator();

            if (!beansIterator.hasNext())
            {
                logger.error(e);
                throw new RuntimeException("can't find ejb (via jndi) or cdi bean for type "
View Full Code Here

    public PrincipalBean()
    {
        super(WebBeansType.PRINCIPAL, Principal.class);
        addApiType(Object.class);
        addApiType(Principal.class);
        addQualifier(new DefaultLiteral());
        setImplScopeType(new DependentScopeLiteral());
    }
View Full Code Here

        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        webBeansContext.getContextFactory().initApplicationContext(null);

        @SuppressWarnings("unchecked")
        Bean<ExternalTestScopedBean> bean = (Bean<ExternalTestScopedBean>) getBeanManager().getBeans(ExternalTestScopedBean.class,
                                                                                                     new DefaultLiteral()).iterator().next();
       
        ExternalTestScopedBean instance = (ExternalTestScopedBean) getBeanManager().getReference(bean, ExternalTestScopedBean.class,
                                                                                                 getBeanManager().createCreationalContext(bean));
       
        Assert.assertNotNull(instance);
View Full Code Here

                    injectField(field, instance, creationalContext);  
                }
                //InjectionPoint.
                else
                {
                    Bean<?> injectionPointBean = getManager().getBeans(InjectionPoint.class, new DefaultLiteral())
                                                              .iterator().next();
                    Object reference = getManager().getReference(injectionPointBean, InjectionPoint.class,
                                             getManager().createCreationalContext(injectionPointBean));
                   
                    setField(instance, field, reference);
View Full Code Here

                boolean observesAnnotation = false;

                if (annot.length == 0)
                {
                    annot = new Annotation[1];
                    annot[0] = new DefaultLiteral();
                }
                else
                {
                    for (Annotation observersAnnot : annot)
                    {
View Full Code Here

TOP

Related Classes of org.apache.webbeans.annotation.DefaultLiteral

Copyright © 2018 www.massapicom. 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.