@Test public void testParseQualifiers() { List<QualifierInstance> instances = Parsers.parseQualifiers("", null, testManager()); assertEquals(0, instances.size()); instances = Parsers.parseQualifiers("jakarta.enterprise.inject.Any", null, testManager()); assertEquals(1, instances.size()); assertEquals(Any.class, instances.get(0).getAnnotationClass()); instances = Parsers.parseQualifiers("jakarta.enterprise.inject.Any,jakarta.inject.Named(value=\"foo\")", null, testManager()); assertEquals(2, instances.size()); assertEquals(Any.class, instances.get(0).getAnnotationClass()); assertEquals(QualifierInstance.of(new NamedLiteral("foo"), null), instances.get(1)); instances = Parsers.parseQualifiers("org.jboss.weld.probe.ParsersTest$Foo(age=5,condition=false,type=java.lang.String,stringArray=[])", null, testManager()); assertEquals(1, instances.size()); assertNotNull(instances.get(0)); assertEquals(5, instances.get(0).getValue("age")); assertEquals(false, instances.get(0).getValue("condition")); assertEquals(String.class, instances.get(0).getValue("type")); assertEquals(15, instances.get(0).getValue("defaultAge")); }
static List<QualifierInstance> parseQualifiers(String qualifiers, ResourceLoader resourceLoader, BeanManager beanManager) { List<QualifierInstance> qualifierInstances = new ArrayList<>(); for (String qualifier : splitQualifiers(qualifiers)) { qualifierInstances.add(createQualifierInstance(qualifier, resourceLoader, beanManager)); } return qualifierInstances; }
Parsers { static List<QualifierInstance> parseQualifiers(String qualifiers, ResourceLoader resourceLoader, BeanManager beanManager) { List<QualifierInstance> qualifierInstances = new ArrayList<>(); for (String qualifier : splitQualifiers(qualifiers)) { qualifierInstances.add(createQualifierInstance(qualifier, resourceLoader, beanManager)); } return qualifierInstances; } }
Parsers { static List<QualifierInstance> parseQualifiers(String qualifiers, ResourceLoader resourceLoader, BeanManager beanManager) { List<QualifierInstance> qualifierInstances = new ArrayList<>(); for (String qualifier : splitQualifiers(qualifiers)) { qualifierInstances.add(createQualifierInstance(qualifier, resourceLoader, beanManager)); } return qualifierInstances; } private  Parsers(); }
Parsers { static List<QualifierInstance> parseQualifiers(String qualifiers, ResourceLoader resourceLoader, BeanManager beanManager) { List<QualifierInstance> qualifierInstances = new ArrayList<>(); for (String qualifier : splitQualifiers(qualifiers)) { qualifierInstances.add(createQualifierInstance(qualifier, resourceLoader, beanManager)); } return qualifierInstances; } private  Parsers();  }
Parsers { static List<QualifierInstance> parseQualifiers(String qualifiers, ResourceLoader resourceLoader, BeanManager beanManager) { List<QualifierInstance> qualifierInstances = new ArrayList<>(); for (String qualifier : splitQualifiers(qualifiers)) { qualifierInstances.add(createQualifierInstance(qualifier, resourceLoader, beanManager)); } return qualifierInstances; } private  Parsers();   }