Examples of NamedLiteral


Examples of com.caucho.inject.NamedLiteral

  public Bean<T> bean()
  {
    if (_name != null && _qualifiers == null) {
      qualifier(DefaultLiteral.DEFAULT);
      qualifier(new NamedLiteral(_name));
    }
   
    return new InjectionBean<T>(_managedBean,
                               _types,
                               _annotated,
View Full Code Here

Examples of org.apache.deltaspike.core.api.literal.NamedLiteral

            String beanName = namedAnnotation.value();
            String newBeanName = beanName.substring(0, 1).toLowerCase() + beanName.substring(1);

            builder.removeFromClass(Named.class)
                    .addToClass(new NamedLiteral(newBeanName));

            processAnnotatedType.setAnnotatedType(builder.create());
        }
    }
View Full Code Here

Examples of org.apache.deltaspike.core.api.literal.NamedLiteral

    {
        Map<String, String> memberValue = new HashMap<String, String>();
        memberValue.put("value", "test");

        Named named1 = AnnotationInstanceProvider.of(Named.class, memberValue);
        Named named2 = new NamedLiteral("test");

        assertTrue(named2.equals(named1));
        assertTrue(named1.equals(named2));
    }
View Full Code Here

Examples of org.apache.deltaspike.core.api.literal.NamedLiteral

    {
        Map<String, String> memberValue = new HashMap<String, String>();
        memberValue.put("value", "test1");

        Named named1 = AnnotationInstanceProvider.of(Named.class, memberValue);
        Named named2 = new NamedLiteral("test");

        assertFalse(named1.equals(named2));
    }
View Full Code Here

Examples of org.apache.deltaspike.core.api.literal.NamedLiteral

    @Test
    public void assertHashCodeSameAsLiteral()
    {
        Named a1 = AnnotationInstanceProvider.of(Named.class);
        Named a2 = new NamedLiteral();

        assertThat(a2.hashCode(), is(a1.hashCode()));
    }
View Full Code Here

Examples of org.apache.deltaspike.core.api.literal.NamedLiteral

        assertEquals("cat", cat.getAnnotation(Named.class).value());

        builder.addToClass(new AlternativeLiteral())
                .addToClass(new ApplicationScopedLiteral())
                .removeFromClass(Named.class)
                .addToClass(new NamedLiteral("tomcat"));

        cat = builder.create();
        assertNotNull(cat);

        assertEquals(3, cat.getAnnotations().size());
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.core.impl.util.NamedLiteral

        for(Annotation originalAnnotation : originalAnnotationSet)
        {
            if(originalAnnotation.annotationType().equals(ManagedBean.class))
            {
                this.annotations.put(Named.class, new NamedLiteral(((ManagedBean)originalAnnotation).name()));
            }
            else if(!originalAnnotation.annotationType().equals(jsf2ScopeAnnotation))
            {
                this.annotations.put(originalAnnotation.annotationType(), originalAnnotation);
            }
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.core.impl.util.NamedLiteral

        for(Annotation originalAnnotation : originalAnnotationSet)
        {
            if(originalAnnotation.annotationType().equals(ManagedBean.class))
            {
                this.annotations.put(Named.class, new NamedLiteral(((ManagedBean)originalAnnotation).name()));
            }
            else if(!originalAnnotation.annotationType().equals(jsf2ScopeAnnotation))
            {
                this.annotations.put(originalAnnotation.annotationType(), originalAnnotation);
            }
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.core.impl.util.NamedLiteral

        for(Annotation originalAnnotation : originalAnnotationSet)
        {
            if(originalAnnotation.annotationType().equals(ManagedBean.class))
            {
                this.annotations.put(Named.class, new NamedLiteral(((ManagedBean)originalAnnotation).name()));
            }
            else if(!originalAnnotation.annotationType().equals(jsf2ScopeAnnotation))
            {
                this.annotations.put(originalAnnotation.annotationType(), originalAnnotation);
            }
View Full Code Here

Examples of org.apache.webbeans.annotation.NamedLiteral

                    Named named = (Named)qualifier;
                    String value = named.value();

                    if(value == null || value.equals(""))
                    {
                        NamedLiteral namedLiteral = new NamedLiteral();
                        namedLiteral.setValue(member.getName());
                        qualifierAnnots[i] = namedLiteral;
                    }

                    break;
                }
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.