test_class.declarator: fileSystem = FileSystems.getDefault()
test_class.original_string: FileSystem fileSystem = FileSystems.getDefault();
test_class.type: FileSystem
test_class.var_name: fileSystem
test_class.declarator: testSourceRoot = fileSystem.getPath("src/test/test-classes-sources")
test_class.original_string: Path testSourceRoot = fileSystem.getPath("src/test/test-classes-sources");
test_class.type: Path
test_class.var_name: testSourceRoot
test_class.declarator: sourceRoot = fileSystem.getPath("target/tmp/src")
test_class.original_string: Path sourceRoot = fileSystem.getPath("target/tmp/src");
test_class.type: Path
test_class.var_name: sourceRoot
test_class.declarator: sourceRoots = asList(sourceRoot)
test_class.original_string: List<Path> sourceRoots = asList(sourceRoot);
test_class.type: List<Path>
test_class.var_name: sourceRoots
test_class.declarator: destination = fileSystem.getPath("target/tmp/classes")
test_class.original_string: Path destination = fileSystem.getPath("target/tmp/classes");
test_class.type: Path
test_class.var_name: destination
test_class.declarator: eventBus = new EventBus()
test_class.original_string: EventBus eventBus = new EventBus();
test_class.type: EventBus
test_class.var_name: eventBus
test_class.declarator: events = new ArrayList<>()
test_class.original_string: List<Object> events = new ArrayList<>();
test_class.type: List<Object>
test_class.var_name: events
test_class.file: restx-classloader/src/test/java/restx/classloader/CompilationManagerTest.java
test_class.identifier: CompilationManagerTest
test_case.body: @Test
      public void should_filter_resources() throws Exception {
          CompilationManager compilationManager = new CompilationManager(eventBus, sourceRoots, destination);
  
          File resource = destination.resolve("restx/classloader/test_resource.txt___jb_old___").toFile();
          assertThat(resource).doesNotExist();
  
          prepareSource("restx/classloader/test_resource.txt___jb_old___");
          compilationManager.rebuild();
          assertThat(resource).doesNotExist();
          assertThat(events).isEmpty();
      }
test_case.class_method_signature: CompilationManagerTest.should_filter_resources()
test_case.full_signature: @Test public void should_filter_resources()
test_case.identifier: should_filter_resources
test_case.invocations: toFile resolve doesNotExist assertThat prepareSource rebuild doesNotExist assertThat isEmpty assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_filter_resources()
focal_class.declarator: NO_OP = new Runnable() {
          @Override
          public void run() {
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final Runnable NO_OP = new Runnable() {
          @Override
          public void run() {
          }
      };
focal_class.type: Runnable
focal_class.var_name: NO_OP
focal_class.declarator: DEFAULT_CLASSPATH_RESOURCE_FILTER = new Predicate<Path>() {
          @Override
          public boolean apply(java.nio.file.Path path) {
              return
                      // Intellij IDEA temporary files
                         !path.toString().endsWith("___jb_old___")
                      && !path.toString().endsWith("___jb_bak___")
  
                      // svn
                      && path.toAbsolutePath().toString().replace('\\', '/').indexOf("/.svn/") == -1;
          }
      }
focal_class.modifier: public static final
focal_class.original_string: public static final Predicate<Path> DEFAULT_CLASSPATH_RESOURCE_FILTER = new Predicate<Path>() {
          @Override
          public boolean apply(java.nio.file.Path path) {
              return
                      // Intellij IDEA temporary files
                         !path.toString().endsWith("___jb_old___")
                      && !path.toString().endsWith("___jb_bak___")
  
                      // svn
                      && path.toAbsolutePath().toString().replace('\\', '/').indexOf("/.svn/") == -1;
          }
      };
focal_class.type: Predicate<Path>
focal_class.var_name: DEFAULT_CLASSPATH_RESOURCE_FILTER
focal_class.declarator: DEFAULT_SETTINGS = new CompilationSettings() {
          @Override
          public int autoCompileCoalescePeriod() {
              return 50;
          }
  
          @Override
          public Predicate<Path> classpathResourceFilter() {
              return DEFAULT_CLASSPATH_RESOURCE_FILTER;
          }
      }
focal_class.modifier: public static final
focal_class.original_string: public static final CompilationSettings DEFAULT_SETTINGS = new CompilationSettings() {
          @Override
          public int autoCompileCoalescePeriod() {
              return 50;
          }
  
          @Override
          public Predicate<Path> classpathResourceFilter() {
              return DEFAULT_CLASSPATH_RESOURCE_FILTER;
          }
      };
focal_class.type: CompilationSettings
focal_class.var_name: DEFAULT_SETTINGS
focal_class.declarator: logger = LoggerFactory.getLogger(CompilationManager.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(CompilationManager.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: eventBus
focal_class.modifier: private final
focal_class.original_string: private final EventBus eventBus;
focal_class.type: EventBus
focal_class.var_name: eventBus
focal_class.declarator: classpathResourceFilter
focal_class.modifier: private final
focal_class.original_string: private final Predicate<Path> classpathResourceFilter;
focal_class.type: Predicate<Path>
focal_class.var_name: classpathResourceFilter
focal_class.declarator: javaCompiler
focal_class.modifier: private final
focal_class.original_string: private final JavaCompiler javaCompiler;
focal_class.type: JavaCompiler
focal_class.var_name: javaCompiler
focal_class.declarator: sourceRoots
focal_class.modifier: private final
focal_class.original_string: private final Iterable<Path> sourceRoots;
focal_class.type: Iterable<Path>
focal_class.var_name: sourceRoots
focal_class.declarator: destination
focal_class.modifier: private final
focal_class.original_string: private final Path destination;
focal_class.type: Path
focal_class.var_name: destination
focal_class.declarator: settings
focal_class.modifier: private final
focal_class.original_string: private final CompilationSettings settings;
focal_class.type: CompilationSettings
focal_class.var_name: settings
focal_class.declarator: fileManager
focal_class.modifier: private final
focal_class.original_string: private final StandardJavaFileManager fileManager;
focal_class.type: StandardJavaFileManager
focal_class.var_name: fileManager
focal_class.declarator: compileExecutor = Executors.newSingleThreadScheduledExecutor()
focal_class.modifier: private final
focal_class.original_string: private final ScheduledExecutorService compileExecutor = Executors.newSingleThreadScheduledExecutor();
focal_class.type: ScheduledExecutorService
focal_class.var_name: compileExecutor
focal_class.declarator: compileQueue = new ConcurrentLinkedDeque<>()
focal_class.modifier: private final
focal_class.original_string: private final ConcurrentLinkedDeque<Path> compileQueue = new ConcurrentLinkedDeque<>();
focal_class.type: ConcurrentLinkedDeque<Path>
focal_class.var_name: compileQueue
focal_class.declarator: hashes = new HashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<Path, SourceHash> hashes = new HashMap<>();
focal_class.type: Map<Path, SourceHash>
focal_class.var_name: hashes
focal_class.declarator: watcherExecutor
focal_class.modifier: private
focal_class.original_string: private ExecutorService watcherExecutor;
focal_class.type: ExecutorService
focal_class.var_name: watcherExecutor
focal_class.declarator: closeableWatchers = new ArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final List<Closeable> closeableWatchers = new ArrayList<>();
focal_class.type: List<Closeable>
focal_class.var_name: closeableWatchers
focal_class.declarator: compiling
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean compiling;
focal_class.type: boolean
focal_class.var_name: compiling
focal_class.declarator: compilationTimeout = 60
focal_class.modifier: private final
focal_class.original_string: private final long compilationTimeout = 60;
focal_class.type: long
focal_class.var_name: compilationTimeout
focal_class.declarator: autoCompileQuietPeriod = 50
focal_class.modifier: private final
focal_class.original_string: private final int autoCompileQuietPeriod = 50;
focal_class.type: int
focal_class.var_name: autoCompileQuietPeriod
focal_class.declarator: useLastModifiedTocheckChanges = true
focal_class.modifier: private final
focal_class.original_string: private final boolean useLastModifiedTocheckChanges = true;
focal_class.type: boolean
focal_class.var_name: useLastModifiedTocheckChanges
focal_class.declarator: lastDiagnostics = new CopyOnWriteArrayList<>()
focal_class.modifier: private
focal_class.original_string: private Collection<Diagnostic<?>> lastDiagnostics = new CopyOnWriteArrayList<>();
focal_class.type: Collection<Diagnostic<?>>
focal_class.var_name: lastDiagnostics
focal_class.declarator: CLASSLOADER_COUNT = new AtomicLong()
focal_class.modifier: private final static
focal_class.original_string: private final static AtomicLong CLASSLOADER_COUNT = new AtomicLong();
focal_class.type: AtomicLong
focal_class.var_name: CLASSLOADER_COUNT
focal_class.file: restx-classloader/src/main/java/restx/classloader/CompilationManager.java
focal_class.identifier: CompilationManager
focal_class.interfaces: implements Closeable
focal_class.class_method_signature: CompilationManager.CompilationManager(EventBus eventBus, Iterable<Path> sourceRoots, Path destination)
focal_class.full_signature: public  CompilationManager(EventBus eventBus, Iterable<Path> sourceRoots, Path destination)
focal_class.identifier: CompilationManager
focal_class.modifiers: public
focal_class.parameters: (EventBus eventBus, Iterable<Path> sourceRoots, Path destination)
focal_class.signature:  CompilationManager(EventBus eventBus, Iterable<Path> sourceRoots, Path destination)
focal_class.class_method_signature: CompilationManager.CompilationManager(EventBus eventBus, final Iterable<Path> sourceRoots, Path destination, CompilationSettings settings)
focal_class.full_signature: public  CompilationManager(EventBus eventBus, final Iterable<Path> sourceRoots, Path destination, CompilationSettings settings)
focal_class.identifier: CompilationManager
focal_class.modifiers: public
focal_class.parameters: (EventBus eventBus, final Iterable<Path> sourceRoots, Path destination, CompilationSettings settings)
focal_class.signature:  CompilationManager(EventBus eventBus, final Iterable<Path> sourceRoots, Path destination, CompilationSettings settings)
focal_class.class_method_signature: CompilationManager.getEventBus()
focal_class.full_signature: public EventBus getEventBus()
focal_class.identifier: getEventBus
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: EventBus
focal_class.signature: EventBus getEventBus()
focal_class.class_method_signature: CompilationManager.getDestination()
focal_class.full_signature: public Path getDestination()
focal_class.identifier: getDestination
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Path
focal_class.signature: Path getDestination()
focal_class.class_method_signature: CompilationManager.getSourceRoots()
focal_class.full_signature: public Iterable<Path> getSourceRoots()
focal_class.identifier: getSourceRoots
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Iterable<Path>
focal_class.signature: Iterable<Path> getSourceRoots()
focal_class.class_method_signature: CompilationManager.copyResource(final SourcePath resourcePath)
focal_class.full_signature: private void copyResource(final SourcePath resourcePath)
focal_class.identifier: copyResource
focal_class.modifiers: private
focal_class.parameters: (final SourcePath resourcePath)
focal_class.return: void
focal_class.signature: void copyResource(final SourcePath resourcePath)
focal_class.class_method_signature: CompilationManager.doCopyResource(SourcePath resourcePath)
focal_class.full_signature: private void doCopyResource(SourcePath resourcePath)
focal_class.identifier: doCopyResource
focal_class.modifiers: private
focal_class.parameters: (SourcePath resourcePath)
focal_class.return: void
focal_class.signature: void doCopyResource(SourcePath resourcePath)
focal_class.class_method_signature: CompilationManager.queueCompile(final Path source)
focal_class.full_signature: private boolean queueCompile(final Path source)
focal_class.identifier: queueCompile
focal_class.modifiers: private
focal_class.parameters: (final Path source)
focal_class.return: boolean
focal_class.signature: boolean queueCompile(final Path source)
focal_class.class_method_signature: CompilationManager.getClassFile(String className)
focal_class.full_signature: public Optional<Path> getClassFile(String className)
focal_class.identifier: getClassFile
focal_class.modifiers: public
focal_class.parameters: (String className)
focal_class.return: Optional<Path>
focal_class.signature: Optional<Path> getClassFile(String className)
focal_class.class_method_signature: CompilationManager.startAutoCompile()
focal_class.full_signature: public void startAutoCompile()
focal_class.identifier: startAutoCompile
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startAutoCompile()
focal_class.class_method_signature: CompilationManager.stopAutoCompile()
focal_class.full_signature: public void stopAutoCompile()
focal_class.identifier: stopAutoCompile
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stopAutoCompile()
focal_class.class_method_signature: CompilationManager.awaitAutoCompile()
focal_class.full_signature: public void awaitAutoCompile()
focal_class.identifier: awaitAutoCompile
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void awaitAutoCompile()
focal_class.class_method_signature: CompilationManager.incrementalCompile()
focal_class.full_signature: public void incrementalCompile()
focal_class.identifier: incrementalCompile
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void incrementalCompile()
focal_class.class_method_signature: CompilationManager.isSource(Path file)
focal_class.full_signature: private boolean isSource(Path file)
focal_class.identifier: isSource
focal_class.modifiers: private
focal_class.parameters: (Path file)
focal_class.return: boolean
focal_class.signature: boolean isSource(Path file)
focal_class.class_method_signature: CompilationManager.rebuild()
focal_class.full_signature: public void rebuild()
focal_class.identifier: rebuild
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void rebuild()
focal_class.class_method_signature: CompilationManager.compileSources(final Path... sources)
focal_class.full_signature: public void compileSources(final Path... sources)
focal_class.identifier: compileSources
focal_class.modifiers: public
focal_class.parameters: (final Path... sources)
focal_class.return: void
focal_class.signature: void compileSources(final Path... sources)
focal_class.class_method_signature: CompilationManager.getLastDiagnostics()
focal_class.full_signature: public Collection<Diagnostic<?>> getLastDiagnostics()
focal_class.identifier: getLastDiagnostics
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<Diagnostic<?>>
focal_class.signature: Collection<Diagnostic<?>> getLastDiagnostics()
focal_class.class_method_signature: CompilationManager.newHotReloadingClassLoader(String rootPackage, ImmutableSet<Class> coldClasses)
focal_class.full_signature: public HotReloadingClassLoader newHotReloadingClassLoader(String rootPackage, ImmutableSet<Class> coldClasses)
focal_class.identifier: newHotReloadingClassLoader
focal_class.modifiers: public
focal_class.parameters: (String rootPackage, ImmutableSet<Class> coldClasses)
focal_class.return: HotReloadingClassLoader
focal_class.signature: HotReloadingClassLoader newHotReloadingClassLoader(String rootPackage, ImmutableSet<Class> coldClasses)
focal_class.class_method_signature: CompilationManager.compile(Collection<Path> sources)
focal_class.full_signature: private void compile(Collection<Path> sources)
focal_class.identifier: compile
focal_class.modifiers: private
focal_class.parameters: (Collection<Path> sources)
focal_class.return: void
focal_class.signature: void compile(Collection<Path> sources)
focal_class.class_method_signature: CompilationManager.saveHashes()
focal_class.full_signature: private void saveHashes()
focal_class.identifier: saveHashes
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void saveHashes()
focal_class.class_method_signature: CompilationManager.loadHashes()
focal_class.full_signature: private void loadHashes()
focal_class.identifier: loadHashes
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void loadHashes()
focal_class.class_method_signature: CompilationManager.hashesFile()
focal_class.full_signature: private File hashesFile()
focal_class.identifier: hashesFile
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: File
focal_class.signature: File hashesFile()
focal_class.class_method_signature: CompilationManager.isCompiling()
focal_class.full_signature: public boolean isCompiling()
focal_class.identifier: isCompiling
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isCompiling()
focal_class.class_method_signature: CompilationManager.hasSourceChanged(Path dir, Path source)
focal_class.full_signature: private boolean hasSourceChanged(Path dir, Path source)
focal_class.identifier: hasSourceChanged
focal_class.modifiers: private
focal_class.parameters: (Path dir, Path source)
focal_class.return: boolean
focal_class.signature: boolean hasSourceChanged(Path dir, Path source)
focal_class.class_method_signature: CompilationManager.newSourceHashFor(SourcePath sourcePath)
focal_class.full_signature: private SourceHash newSourceHashFor(SourcePath sourcePath)
focal_class.identifier: newSourceHashFor
focal_class.modifiers: private
focal_class.parameters: (SourcePath sourcePath)
focal_class.return: SourceHash
focal_class.signature: SourceHash newSourceHashFor(SourcePath sourcePath)
focal_class.class_method_signature: CompilationManager.hash(File file)
focal_class.full_signature: private String hash(File file)
focal_class.identifier: hash
focal_class.modifiers: private
focal_class.parameters: (File file)
focal_class.return: String
focal_class.signature: String hash(File file)
focal_class.class_method_signature: CompilationManager.parse(String str)
focal_class.full_signature: private SourceHash parse(String str)
focal_class.identifier: parse
focal_class.modifiers: private
focal_class.parameters: (String str)
focal_class.return: SourceHash
focal_class.signature: SourceHash parse(String str)
focal_class.class_method_signature: CompilationManager.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: public void rebuild() {
          try {
              Exception e = compileExecutor.submit(new Callable<Exception>() {
                  @Override
                  public Exception call() throws Exception {
                      try {
                          compileQueue.clear();
                          MoreFiles.delete(destination);
                          destination.toFile().mkdirs();
  
  
                          final Collection<Path> sources = new ArrayList<>();
                          for (final Path sourceRoot : sourceRoots) {
                              if (sourceRoot.toFile().exists()) {
                                  Files.walkFileTree(sourceRoot, new SimpleFileVisitor<Path>() {
                                      @Override
                                      public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
                                              throws IOException {
                                          if (isSource(file)) {
                                              sources.add(file);
                                          } else if (file.toFile().isFile()) {
                                              doCopyResource(SourcePath.valueOf(sourceRoot, sourceRoot.relativize(file)));
                                          }
                                          return FileVisitResult.CONTINUE;
                                      }
                                  });
                              }
                          }
  
                          compile(sources);
                          return null;
                      } catch (Exception e) {
                          return e;
                      }
                  }
              }).get(compilationTimeout, TimeUnit.SECONDS);
              if (e != null) {
                  throw new RuntimeException(e);
              }
          } catch (InterruptedException e) {
              throw new RuntimeException(e);
          } catch (ExecutionException e) {
              throw new RuntimeException(e);
          } catch (TimeoutException e) {
              throw new RuntimeException(e);
          }
      }
focal_method.class_method_signature: CompilationManager.rebuild()
focal_method.full_signature: public void rebuild()
focal_method.identifier: rebuild
focal_method.invocations: get submit clear delete mkdirs toFile exists toFile walkFileTree isSource add isFile toFile doCopyResource valueOf relativize compile
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void rebuild()