@Test void createAttachmentClassLoader() throws Exception { ExtendedURLClassLoader cl = factory.createAttachmentClassLoader( "attach:page@filename1, http: assertEquals(3, cl.getURLs().length); assertEquals("attachmentjar: assertEquals("http: assertEquals("attachmentjar: }
@Override public ExtendedURLClassLoader createAttachmentClassLoader(String jarURLs, ClassLoader parent) throws Exception { List<URL> urls = new ArrayList<>(); for (URI uri : extractURIs(jarURLs)) { urls.add(new URL(null, uri.toString(), this.streamHandlerFactory.createURLStreamHandler(uri.getScheme()))); } return new ExtendedURLClassLoader(urls.toArray(new URL[0]), parent, this.streamHandlerFactory); }
DefaultAttachmentClassLoaderFactory implements AttachmentClassLoaderFactory { @Override public ExtendedURLClassLoader createAttachmentClassLoader(String jarURLs, ClassLoader parent) throws Exception { List<URL> urls = new ArrayList<>(); for (URI uri : extractURIs(jarURLs)) { urls.add(new URL(null, uri.toString(), this.streamHandlerFactory.createURLStreamHandler(uri.getScheme()))); } return new ExtendedURLClassLoader(urls.toArray(new URL[0]), parent, this.streamHandlerFactory); } }
DefaultAttachmentClassLoaderFactory implements AttachmentClassLoaderFactory { @Override public ExtendedURLClassLoader createAttachmentClassLoader(String jarURLs, ClassLoader parent) throws Exception { List<URL> urls = new ArrayList<>(); for (URI uri : extractURIs(jarURLs)) { urls.add(new URL(null, uri.toString(), this.streamHandlerFactory.createURLStreamHandler(uri.getScheme()))); } return new ExtendedURLClassLoader(urls.toArray(new URL[0]), parent, this.streamHandlerFactory); }  }
DefaultAttachmentClassLoaderFactory implements AttachmentClassLoaderFactory { @Override public ExtendedURLClassLoader createAttachmentClassLoader(String jarURLs, ClassLoader parent) throws Exception { List<URL> urls = new ArrayList<>(); for (URI uri : extractURIs(jarURLs)) { urls.add(new URL(null, uri.toString(), this.streamHandlerFactory.createURLStreamHandler(uri.getScheme()))); } return new ExtendedURLClassLoader(urls.toArray(new URL[0]), parent, this.streamHandlerFactory); }  @Override ExtendedURLClassLoader createAttachmentClassLoader(String jarURLs, ClassLoader parent); @Override void extendAttachmentClassLoader(String jarURLs, ExtendedURLClassLoader source); }
DefaultAttachmentClassLoaderFactory implements AttachmentClassLoaderFactory { @Override public ExtendedURLClassLoader createAttachmentClassLoader(String jarURLs, ClassLoader parent) throws Exception { List<URL> urls = new ArrayList<>(); for (URI uri : extractURIs(jarURLs)) { urls.add(new URL(null, uri.toString(), this.streamHandlerFactory.createURLStreamHandler(uri.getScheme()))); } return new ExtendedURLClassLoader(urls.toArray(new URL[0]), parent, this.streamHandlerFactory); }  @Override ExtendedURLClassLoader createAttachmentClassLoader(String jarURLs, ClassLoader parent); @Override void extendAttachmentClassLoader(String jarURLs, ExtendedURLClassLoader source);  }