test_class.declarator: defaultTypeDeterminator
test_class.original_string: DefaultTypeDeterminator defaultTypeDeterminator;
test_class.type: DefaultTypeDeterminator
test_class.var_name: defaultTypeDeterminator
test_class.declarator: type
test_class.original_string: Class<CharSequence> type;
test_class.type: Class<CharSequence>
test_class.var_name: type
test_class.declarator: candidates
test_class.original_string: Class<? extends CharSequence>[] candidates;
test_class.type: Class<? extends CharSequence>[]
test_class.var_name: candidates
test_class.declarator: qualifier
test_class.original_string: Annotation qualifier;
test_class.type: Annotation
test_class.var_name: qualifier
test_class.declarator: classLoader = Thread.currentThread().getContextClassLoader()
test_class.original_string: ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
test_class.type: ClassLoader
test_class.var_name: classLoader
test_class.declarator: anno = new Single() {
          
          @Override
          public Class<? extends Annotation> annotationType() {
              return Single.class;
          }
          
      }
test_class.original_string: Single anno = new Single() {
          
          @Override
          public Class<? extends Annotation> annotationType() {
              return Single.class;
          }
          
      };
test_class.type: Single
test_class.var_name: anno
test_class.file: core/src/test/java/com/github/jsr330/instance/DefaultTypeDeterminatorTest.java
test_class.identifier: DefaultTypeDeterminatorTest
test_case.body: @SuppressWarnings("unchecked")
      @Test
      public void determineClass_WithQualifier_WithCandidate() {
          candidates = new Class[] { SingleBean.class };
          assertEquals(SingleBean.class, defaultTypeDeterminator.determineClass(type, candidates, anno, classLoader));
      }
test_case.class_method_signature: DefaultTypeDeterminatorTest.determineClass_WithQualifier_WithCandidate()
test_case.full_signature: @SuppressWarnings("unchecked") @Test public void determineClass_WithQualifier_WithCandidate()
test_case.identifier: determineClass_WithQualifier_WithCandidate
test_case.invocations: assertEquals determineClass
test_case.modifiers: @SuppressWarnings("unchecked") @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void determineClass_WithQualifier_WithCandidate()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(DefaultTypeDeterminator.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(DefaultTypeDeterminator.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.file: core/src/main/java/com/github/jsr330/instance/DefaultTypeDeterminator.java
focal_class.identifier: DefaultTypeDeterminator
focal_class.interfaces: implements TypeDeterminator
focal_class.class_method_signature: DefaultTypeDeterminator.determineClass(Class<T> type, Class<? extends T>[] candidates, Annotation qualifier, ClassLoader classLoader)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public Class<T> determineClass(Class<T> type, Class<? extends T>[] candidates, Annotation qualifier, ClassLoader classLoader)
focal_class.identifier: determineClass
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (Class<T> type, Class<? extends T>[] candidates, Annotation qualifier, ClassLoader classLoader)
focal_class.return: Class<T>
focal_class.signature: Class<T> determineClass(Class<T> type, Class<? extends T>[] candidates, Annotation qualifier, ClassLoader classLoader)
focal_method.body: @SuppressWarnings("unchecked")
      @Override
      public <T> Class<T> determineClass(Class<T> type, Class<? extends T>[] candidates, Annotation qualifier, ClassLoader classLoader) {
          String namePrefix = "";
          
          if (qualifier != null) {
              if (qualifier instanceof Named) {
                  namePrefix = ((Named) qualifier).value();
              } else {
                  namePrefix = qualifier.annotationType().getSimpleName();
              }
              
              if (candidates != null) {
                  for (Class<? extends T> candidate : candidates) {
                      if (candidate.getSimpleName().toLowerCase().startsWith(namePrefix.toLowerCase())) {
                          LOGGER.debug("determineClass - returning decent {} for {}", candidate, type);
                          return (Class<T>) candidate;
                      }
                  }
              }
          }
          
          LOGGER.debug("determineClass - returning {} for {}", type, type);
          return type;
      }
focal_method.class_method_signature: DefaultTypeDeterminator.determineClass(Class<T> type, Class<? extends T>[] candidates, Annotation qualifier, ClassLoader classLoader)
focal_method.full_signature: @SuppressWarnings("unchecked") @Override public Class<T> determineClass(Class<T> type, Class<? extends T>[] candidates, Annotation qualifier, ClassLoader classLoader)
focal_method.identifier: determineClass
focal_method.invocations: value getSimpleName annotationType startsWith toLowerCase getSimpleName toLowerCase debug debug
focal_method.modifiers: @SuppressWarnings("unchecked") @Override public
focal_method.parameters: (Class<T> type, Class<? extends T>[] candidates, Annotation qualifier, ClassLoader classLoader)
focal_method.return: Class<T>
focal_method.signature: Class<T> determineClass(Class<T> type, Class<? extends T>[] candidates, Annotation qualifier, ClassLoader classLoader)