Package org.apache.deltaspike.core.api.literal

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


    {
        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

    {
        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

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

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

        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

TOP

Related Classes of org.apache.deltaspike.core.api.literal.NamedLiteral

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.