Package org.apache.webbeans.annotation

Examples of org.apache.webbeans.annotation.DefaultLiteral


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


    public ValidatorBean()
    {
        super(WebBeansType.VALIDATION, Validator.class);
        addApiType(Object.class);
        addApiType(Validator.class);
        addQualifier(new DefaultLiteral());
        setImplScopeType(new DependentScopeLiteral());
    }
View Full Code Here

        account.withdraw(new BigDecimal(3000));

        Set<Type> apiTyeps = new HashSet<Type>();
        apiTyeps.add(Account.class);

        List<Decorator<?>> decs = getManager().resolveDecorators(apiTyeps, new Annotation[] { new DefaultLiteral() });

        LargeTransactionDecorator dec = (LargeTransactionDecorator) getManager().getInstance(decs.get(0));
        Assert.assertEquals(null, dec.getDepositeAmount());
        Assert.assertEquals(null, dec.getWithDrawAmount());
View Full Code Here

                    if(this.injectionOwnerBean instanceof ProducerMethodBean)
                    {
                        if(parameter.getBaseType().equals(InjectionPoint.class))
                        {
                            BeanManager manager = BeanManagerImpl.getManager();
                            Bean<?> injectionPointBean = manager.getBeans(InjectionPoint.class, new DefaultLiteral()).iterator().next();
                            Object reference = manager.getReference(injectionPointBean, InjectionPoint.class, manager.createCreationalContext(injectionPointBean));
                           
                            list.add(reference);
                           
                            injectionPoint = true;
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

                    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

       

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

        else
        {
            if (qualifier.length == 0)
            {
                qualifier = new Annotation[1];
                qualifier[0] = new DefaultLiteral();
                currentQualifier = true;
            }                       
        }
       
        if (injectionPointType.equals(Object.class) && currentQualifier)
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.