Examples of NamedLiteral


Examples of org.jboss.weld.literal.NamedLiteral

    }

    @Test
    public void testBeanAttributesForManagedBeanWithModifiedAnnotatedType() {
        AnnotatedType<Mountain> type = manager.createAnnotatedType(Mountain.class);
        AnnotatedType<Mountain> wrappedType = new WrappedAnnotatedType<Mountain>(type, new NamedLiteral("Mount Blanc"));
        BeanAttributes<Mountain> attributes = manager.createBeanAttributes(wrappedType);
        verifyTypes(attributes, Mountain.class, Landmark.class, Object.class);
        assertTrue(attributes.getStereotypes().isEmpty());
        verifyQualifierTypes(attributes, Named.class, Any.class, Default.class);
        assertEquals(Dependent.class, attributes.getScope());
View Full Code Here

Examples of org.jboss.weld.literal.NamedLiteral

                    }
                }
                normalizedQualifiers.addAll(qualifiers);
                normalizedQualifiers.add(AnyLiteral.INSTANCE);
                if (name != null && normalizedQualifiers.remove(NamedLiteral.DEFAULT)) {
                    normalizedQualifiers.add(new NamedLiteral(name));
                }
                this.qualifiers = SharedObjectCache.instance(manager).getSharedSet(normalizedQualifiers);
            }
        }
View Full Code Here

Examples of org.jboss.weld.literal.NamedLiteral

                if (member instanceof Executable) {
                    // Method or constructor injection
                    Executable executable = (Executable) member;
                    AnnotatedParameter<?> annotatedParameter = (AnnotatedParameter<?>) injectionPoint.getAnnotated();
                    Parameter parameter = executable.getParameters()[annotatedParameter.getPosition()];
                    named = new NamedLiteral(parameter.getName());
                } else {
                    named = new NamedLiteral(injectionPoint.getMember().getName());
                }

                qualifierInstance = QualifierInstance.of(named, store);
                qualifiers.add(named);
                qualifierInstances.add(qualifierInstance);
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.