Examples of DefaultLiteral


Examples of org.apache.webbeans.annotation.DefaultLiteral

        ContextFactory.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

Examples of org.apache.webbeans.annotation.DefaultLiteral

    {
        boolean isDefined = XMLDefinitionUtil.defineXMLBindingType(component, annotationSet, annotationElementList, createConfigurationFailedMessage());

        if (!isDefined)
        {
            component.addQualifier(new DefaultLiteral());
        }

    }
View Full Code Here

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

Examples of org.apache.webbeans.annotation.DefaultLiteral

        }
       
        //Add the default qualifier if no others exist.  Section 3.10, OWB-142///
        if(set.size() == 0)
        {
            set.add(new DefaultLiteral());
        }
        ////////////////////////////////////////////////////////////////////////

        Annotation[] a = new Annotation[set.size()];
        a = set.toArray(a);
View Full Code Here

Examples of org.apache.webbeans.annotation.DefaultLiteral

    public InjectionPointBean()
    {
        super(WebBeansType.INJECTIONPOINT,InjectionPoint.class);
       
        addQualifier(new DefaultLiteral());
        setImplScopeType(new DependentScopeLiteral());
        addApiType(InjectionPoint.class);
        addApiType(Object.class);
    }
View Full Code Here

Examples of org.apache.webbeans.annotation.DefaultLiteral

        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

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

Examples of org.jboss.cdi.tck.literals.DefaultLiteral

    @Test
    @SpecAssertion(section = BEANMANAGER, id = "ac")
    public void testManagerBeanHasCurrentBinding() {
        Bean<BeanManager> beanManager = getBeans(BeanManager.class).iterator().next();
        assert beanManager.getQualifiers().contains(new DefaultLiteral());
    }
View Full Code Here

Examples of org.jboss.cdi.tck.literals.DefaultLiteral

    @Test
    @SpecAssertion(section = "5.6.1", id = "da")
    public void testDuplicateBindingsThrowsException() {
        try {
            ObtainsInstanceBean injectionPoint = getInstanceByType(ObtainsInstanceBean.class);
            injectionPoint.getAnyPaymentProcessor().select(new DefaultLiteral(), new DefaultLiteral());
        } catch (Throwable t) {
            assert isThrowablePresent(IllegalArgumentException.class, t);
            return;
        }
        assert false;
View Full Code Here

Examples of org.jboss.cdi.tck.literals.DefaultLiteral

    @Test
    @SpecAssertions({ @SpecAssertion(section = "2.3.1", id = "a0"), @SpecAssertion(section = "2.3.1", id = "aa") })
    public void testDefaultQualifierDeclaredInJava() {
        Bean<Order> order = getBeans(Order.class).iterator().next();
        assert order.getQualifiers().size() == 2;
        assert order.getQualifiers().contains(new DefaultLiteral());
        assert order.getQualifiers().contains(AnyLiteral.INSTANCE);
    }
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.