test_class.declarator: defaultClassScanner
test_class.original_string: DefaultClassScanner defaultClassScanner;
test_class.type: DefaultClassScanner
test_class.var_name: defaultClassScanner
test_class.declarator: parent
test_class.modifier: @Mock
test_class.original_string: @Mock
      ClassScanner parent;
test_class.type: ClassScanner
test_class.var_name: parent
test_class.declarator: sourceDirFilter
test_class.modifier: @Mock
test_class.original_string: @Mock
      GenericFilter<URI> sourceDirFilter;
test_class.type: GenericFilter<URI>
test_class.var_name: sourceDirFilter
test_class.declarator: classNameFilter
test_class.modifier: @Mock
test_class.original_string: @Mock
      GenericFilter<String> classNameFilter;
test_class.type: GenericFilter<String>
test_class.var_name: classNameFilter
test_class.declarator: sourceDirFilterParameter
test_class.modifier: @Captor
test_class.original_string: @Captor
      ArgumentCaptor<URI> sourceDirFilterParameter;
test_class.type: ArgumentCaptor<URI>
test_class.var_name: sourceDirFilterParameter
test_class.declarator: classNameFilterParameter
test_class.modifier: @Captor
test_class.original_string: @Captor
      ArgumentCaptor<String> classNameFilterParameter;
test_class.type: ArgumentCaptor<String>
test_class.var_name: classNameFilterParameter
test_class.file: core/src/test/java/com/github/jsr330/scanning/DefaultClassScannerTest.java
test_class.identifier: DefaultClassScannerTest
test_case.body: @Test
      public void scanWithoutParentAndFilter() {
          Map<String, Class<?>> classes = defaultClassScanner.scan(Thread.currentThread().getContextClassLoader());
          
          verifyZeroInteractions(parent);
          verifyZeroInteractions(classNameFilter);
          verifyZeroInteractions(sourceDirFilter);
          
          assertTrue(classes.containsKey(Test.class.getName()));
      }
test_case.class_method_signature: DefaultClassScannerTest.scanWithoutParentAndFilter()
test_case.full_signature: @Test public void scanWithoutParentAndFilter()
test_case.identifier: scanWithoutParentAndFilter
test_case.invocations: scan getContextClassLoader currentThread verifyZeroInteractions verifyZeroInteractions verifyZeroInteractions assertTrue containsKey getName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void scanWithoutParentAndFilter()
focal_class.declarator: FILE_SEPARATOR_REGEX = Pattern.compile("\\" + System.getProperty("file.separator"))
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern FILE_SEPARATOR_REGEX = Pattern.compile("\\" + System.getProperty("file.separator"));
focal_class.type: Pattern
focal_class.var_name: FILE_SEPARATOR_REGEX
focal_class.declarator: ENTRY_SEPARATOR_REGEX = Pattern.compile("/")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern ENTRY_SEPARATOR_REGEX = Pattern.compile("/");
focal_class.type: Pattern
focal_class.var_name: ENTRY_SEPARATOR_REGEX
focal_class.declarator: LOGGER = LoggerFactory.getLogger(DefaultClassScanner.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(DefaultClassScanner.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: parent
focal_class.modifier: protected
focal_class.original_string: protected ClassScanner parent;
focal_class.type: ClassScanner
focal_class.var_name: parent
focal_class.declarator: sourceDirFilter
focal_class.modifier: protected
focal_class.original_string: protected GenericFilter<URI> sourceDirFilter;
focal_class.type: GenericFilter<URI>
focal_class.var_name: sourceDirFilter
focal_class.declarator: classNameFilter
focal_class.modifier: protected
focal_class.original_string: protected GenericFilter<String> classNameFilter;
focal_class.type: GenericFilter<String>
focal_class.var_name: classNameFilter
focal_class.declarator: classes
focal_class.modifier: protected
focal_class.original_string: protected Map<String, Class<?>> classes;
focal_class.type: Map<String, Class<?>>
focal_class.var_name: classes
focal_class.declarator: monitor = new Object()
focal_class.modifier: protected
focal_class.original_string: protected Object monitor = new Object();
focal_class.type: Object
focal_class.var_name: monitor
focal_class.file: core/src/main/java/com/github/jsr330/scanning/DefaultClassScanner.java
focal_class.identifier: DefaultClassScanner
focal_class.interfaces: implements ClassScanner
focal_class.class_method_signature: DefaultClassScanner.DefaultClassScanner()
focal_class.full_signature: public  DefaultClassScanner()
focal_class.identifier: DefaultClassScanner
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  DefaultClassScanner()
focal_class.class_method_signature: DefaultClassScanner.DefaultClassScanner(ClassScanner parent)
focal_class.full_signature: public  DefaultClassScanner(ClassScanner parent)
focal_class.identifier: DefaultClassScanner
focal_class.modifiers: public
focal_class.parameters: (ClassScanner parent)
focal_class.signature:  DefaultClassScanner(ClassScanner parent)
focal_class.class_method_signature: DefaultClassScanner.DefaultClassScanner(GenericFilter<URI> sourceDirFilter, GenericFilter<String> classNameFilter)
focal_class.full_signature: public  DefaultClassScanner(GenericFilter<URI> sourceDirFilter, GenericFilter<String> classNameFilter)
focal_class.identifier: DefaultClassScanner
focal_class.modifiers: public
focal_class.parameters: (GenericFilter<URI> sourceDirFilter, GenericFilter<String> classNameFilter)
focal_class.signature:  DefaultClassScanner(GenericFilter<URI> sourceDirFilter, GenericFilter<String> classNameFilter)
focal_class.class_method_signature: DefaultClassScanner.DefaultClassScanner(ClassScanner parent, GenericFilter<URI> sourceDirFilter, GenericFilter<String> classNameFilter)
focal_class.full_signature: public  DefaultClassScanner(ClassScanner parent, GenericFilter<URI> sourceDirFilter, GenericFilter<String> classNameFilter)
focal_class.identifier: DefaultClassScanner
focal_class.modifiers: public
focal_class.parameters: (ClassScanner parent, GenericFilter<URI> sourceDirFilter, GenericFilter<String> classNameFilter)
focal_class.signature:  DefaultClassScanner(ClassScanner parent, GenericFilter<URI> sourceDirFilter, GenericFilter<String> classNameFilter)
focal_class.class_method_signature: DefaultClassScanner.scan(ClassLoader loader)
focal_class.full_signature: @Override public Map<String, Class<?>> scan(ClassLoader loader)
focal_class.identifier: scan
focal_class.modifiers: @Override public
focal_class.parameters: (ClassLoader loader)
focal_class.return: Map<String, Class<?>>
focal_class.signature: Map<String, Class<?>> scan(ClassLoader loader)
focal_class.class_method_signature: DefaultClassScanner.traverseJar(String base, URL url, ClassLoader loader, Map<String, Class<?>> classes)
focal_class.full_signature: protected void traverseJar(String base, URL url, ClassLoader loader, Map<String, Class<?>> classes)
focal_class.identifier: traverseJar
focal_class.modifiers: protected
focal_class.parameters: (String base, URL url, ClassLoader loader, Map<String, Class<?>> classes)
focal_class.return: void
focal_class.signature: void traverseJar(String base, URL url, ClassLoader loader, Map<String, Class<?>> classes)
focal_class.class_method_signature: DefaultClassScanner.traverseFile(String base, File file, ClassLoader loader, Map<String, Class<?>> classes)
focal_class.full_signature: protected void traverseFile(String base, File file, ClassLoader loader, Map<String, Class<?>> classes)
focal_class.identifier: traverseFile
focal_class.modifiers: protected
focal_class.parameters: (String base, File file, ClassLoader loader, Map<String, Class<?>> classes)
focal_class.return: void
focal_class.signature: void traverseFile(String base, File file, ClassLoader loader, Map<String, Class<?>> classes)
focal_class.class_method_signature: DefaultClassScanner.createClass(ClassLoader loader, Map<String, Class<?>> classes, String name)
focal_class.full_signature: protected void createClass(ClassLoader loader, Map<String, Class<?>> classes, String name)
focal_class.identifier: createClass
focal_class.modifiers: protected
focal_class.parameters: (ClassLoader loader, Map<String, Class<?>> classes, String name)
focal_class.return: void
focal_class.signature: void createClass(ClassLoader loader, Map<String, Class<?>> classes, String name)
focal_method.body: @Override
      public Map<String, Class<?>> scan(ClassLoader loader) {
          Enumeration<URL> urls;
          URL url;
          String tmp;
          Map<String, Class<?>> parentClasses;
          File file;
          URI uri;
          
          synchronized (monitor) {
              if (classes == null) {
                  classes = new TreeMap<String, Class<?>>();
                  
                  if (parent != null) {
                      if ((parentClasses = parent.scan(loader)) != null) {
                          classes.putAll(parentClasses);
                      }
                  }
                  
                  try {
                      urls = loader.getResources("META-INF");
                      while (urls.hasMoreElements()) {
                          url = urls.nextElement();
                          tmp = url.toExternalForm();
                          tmp = tmp.substring(0, tmp.length() - 8);
                          LOGGER.debug("listClasses - source={}", tmp);
                          
                          try {
                              if (tmp.startsWith("file:")) {
                                  uri = new URI(tmp);
                                  if (sourceDirFilter == null || sourceDirFilter != null && sourceDirFilter.filter(uri)) {
                                      file = new File(uri);
                                      traverseFile(file.getAbsolutePath(), file, loader, classes);
                                  }
                              } else if (tmp.startsWith("jar:")) {
                                  uri = new URI(tmp.substring(4, tmp.length() - 2));
                                  if (sourceDirFilter == null || sourceDirFilter != null && sourceDirFilter.filter(uri)) {
                                      file = new File(uri);
                                      traverseJar(file.getAbsolutePath(), file.toURI().toURL(), loader, classes);
                                  }
                              }
                          } catch (URISyntaxException exception) {
                              LOGGER.debug("error while generating URI", exception);
                          }
                      }
                  } catch (IOException exception) {
                      LOGGER.debug("error while traversing jar", exception);
                  }
              }
          }
          
          return classes;
      }
focal_method.class_method_signature: DefaultClassScanner.scan(ClassLoader loader)
focal_method.full_signature: @Override public Map<String, Class<?>> scan(ClassLoader loader)
focal_method.identifier: scan
focal_method.invocations: scan putAll getResources hasMoreElements nextElement toExternalForm substring length debug startsWith filter traverseFile getAbsolutePath startsWith substring length filter traverseJar getAbsolutePath toURL toURI debug debug
focal_method.modifiers: @Override public
focal_method.parameters: (ClassLoader loader)
focal_method.return: Map<String, Class<?>>
focal_method.signature: Map<String, Class<?>> scan(ClassLoader loader)