use of org.glassfish.hk2.utilities.NamedImpl in project Payara by payara.
the class HK2IntegrationUtilities method getHK2Qualifiers.
private static Set<Annotation> getHK2Qualifiers(InjectionPoint injectionPoint) {
Set<Annotation> setQualifiers = injectionPoint.getQualifiers();
Set<Annotation> retVal = new HashSet<Annotation>();
for (Annotation anno : setQualifiers) {
if (anno.annotationType().equals(Default.class))
continue;
if (anno.annotationType().equals(Named.class)) {
Named named = (Named) anno;
if ("".equals(named.value())) {
Annotated annotated = injectionPoint.getAnnotated();
if (annotated instanceof AnnotatedField) {
AnnotatedField<?> annotatedField = (AnnotatedField<?>) annotated;
Field field = annotatedField.getJavaMember();
anno = new NamedImpl(field.getName());
}
}
}
retVal.add(anno);
}
return retVal;
}
Aggregations