Package org.apache.webbeans.annotation

Examples of org.apache.webbeans.annotation.DefaultLiteral


                    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));
                   
                    ClassUtil.setField(instance, field, reference);
View Full Code Here


        comp.setEnabled(true);

        DefinitionUtil.defineApiTypes(comp, clazz);

        comp.setImplScopeType(new ApplicationScopeLiteral());
        comp.addQualifier(new DefaultLiteral());

        DefinitionUtil.defineObserverMethods(comp, clazz);

        return comp;
    }
View Full Code Here

    public static BeanManagerBean getManagerBean()
    {
        BeanManagerBean managerComponent = new BeanManagerBean();

        managerComponent.setImplScopeType(new DependentScopeLiteral());
        managerComponent.addQualifier(new DefaultLiteral());
        managerComponent.addQualifier(new AnyLiteral());
        managerComponent.addApiType(BeanManager.class);
        managerComponent.addApiType(Object.class);

        return managerComponent;
View Full Code Here

        conversationComp.addApiType(Conversation.class);
        conversationComp.addApiType(ConversationImpl.class);
        conversationComp.addApiType(Object.class);
        conversationComp.setImplScopeType(new RequestedScopeLiteral());
        conversationComp.addQualifier(new DefaultLiteral());
        conversationComp.addQualifier(new AnyLiteral());
        conversationComp.setName("javax.enterprise.context.conversation");

        WebBeansDecoratorConfig.configureDecarotors(conversationComp);
View Full Code Here

            typeArray = typeArguments.toArray(typeArray);
            model = new XMLInjectionPointModel(clazz, typeArray);

            if (bindingAnnots.isEmpty())
            {
                model.addBindingType(new DefaultLiteral());
            }

            for (Annotation annot : bindingAnnots)
            {
                model.addBindingType(annot);
View Full Code Here

            }
        }

        if (anns.size() == 0)
        {
            model.addBindingType(new DefaultLiteral());
        }

        for (Annotation ann : anns)
        {
            model.addBindingType(ann);
View Full Code Here

            }
        }

        if (anns.size() == 0)
        {
            component.addQualifier(new DefaultLiteral());
        }

        for (Annotation ann : anns)
        {
            component.addQualifier(ann);
View Full Code Here

        startContainer(classes);

        MockServletContext servletContext = new MockServletContext();
        ContextFactory.initApplicationContext(servletContext);

        Bean<MyExtension> extension = (Bean<MyExtension>) getBeanManager().getBeans(MyExtension.class, new DefaultLiteral()).iterator().next();
       
        MyExtension ext = (MyExtension) getBeanManager().getReference(extension, MyExtension.class, getBeanManager().createCreationalContext(extension));
       
        System.out.println(ext.toString());
       
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

       

        // 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

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.