@Test public void testDependencyLoader() throws IOException, ClassNotFoundException { DependencyLoader loader = new DependencyLoader(); loader.dependencyStore = store; Dependency dependency = new Dependency(); dependency.setUrl(new URL("https: dependency.setSha512sum(DatatypeConverter.parseHexBinary( "c84ad9f1646b52b6e19f55c3c63936c6dbe59597d53cec6855f85e21ad26f9bc27b0c541b793fab117e2359b1bf3fcd59b222255345fce858bc03cc48cbffd65")); DependencySet dependencySet = new DependencySet(); dependencySet.setDependencies(Collections.singletonList(dependency)); loader.downloadDependencies(dependencySet); Assert.assertNotSame(loader.toParentLastClassLoader().loadClass("com.google.common.collect.Sets"), Sets.class); Assert.assertSame(loader.toParentFirstClassLoader().loadClass("com.google.common.collect.Sets"), Sets.class); }
@SuppressWarnings("UseOfSystemOutOrSystemErr") public DependencyLoader() { this(System.err); }
DependencyLoader { @SuppressWarnings("UseOfSystemOutOrSystemErr") public DependencyLoader() { this(System.err); } }
DependencyLoader { @SuppressWarnings("UseOfSystemOutOrSystemErr") public DependencyLoader() { this(System.err); } @SuppressWarnings("UseOfSystemOutOrSystemErr")  DependencyLoader();  DependencyLoader(PrintStream streamLogger);  DependencyLoader(java.util.logging.Logger julLogger); private  DependencyLoader(Logger logger); }
DependencyLoader { @SuppressWarnings("UseOfSystemOutOrSystemErr") public DependencyLoader() { this(System.err); } @SuppressWarnings("UseOfSystemOutOrSystemErr")  DependencyLoader();  DependencyLoader(PrintStream streamLogger);  DependencyLoader(java.util.logging.Logger julLogger); private  DependencyLoader(Logger logger); DependencyLoader addUrls(URL... urls); @SneakyThrows(NoSuchAlgorithmException.class) DependencyLoader downloadDependencies(DependencySet dependencySet); DependencyLoader downloadDependencies(); @SneakyThrows(ReflectiveOperationException.class) void appendToClassLoader(URLClassLoader classLoader); ClassLoader toParentFirstClassLoader(); ClassLoader toParentFirstClassLoader(ClassLoader parent); ClassLoader toParentLastClassLoader(); ClassLoader toParentLastClassLoader(ClassLoader parent); }
DependencyLoader { @SuppressWarnings("UseOfSystemOutOrSystemErr") public DependencyLoader() { this(System.err); } @SuppressWarnings("UseOfSystemOutOrSystemErr")  DependencyLoader();  DependencyLoader(PrintStream streamLogger);  DependencyLoader(java.util.logging.Logger julLogger); private  DependencyLoader(Logger logger); DependencyLoader addUrls(URL... urls); @SneakyThrows(NoSuchAlgorithmException.class) DependencyLoader downloadDependencies(DependencySet dependencySet); DependencyLoader downloadDependencies(); @SneakyThrows(ReflectiveOperationException.class) void appendToClassLoader(URLClassLoader classLoader); ClassLoader toParentFirstClassLoader(); ClassLoader toParentFirstClassLoader(ClassLoader parent); ClassLoader toParentLastClassLoader(); ClassLoader toParentLastClassLoader(ClassLoader parent);  }