@Test(expected = NoSuchElementException.class) public void testMultipleParentEnumerationNotFound() throws Exception { ClassLoader classLoader = new MultipleParentClassLoader.Builder().append(first, second, null).build(); Enumeration<URL> enumeration = classLoader.getResources(BAZ); assertThat(enumeration.hasMoreElements(), is(false)); enumeration.nextElement(); }
public Enumeration<URL> getResources(String name) throws IOException { List<Enumeration<URL>> enumerations = new ArrayList<Enumeration<URL>>(parents.size() + 1); for (ClassLoader parent : parents) { enumerations.add(parent.getResources(name)); } enumerations.add(super.getResources(name)); return new CompoundEnumeration(enumerations); }
MultipleParentClassLoader extends InjectionClassLoader { public Enumeration<URL> getResources(String name) throws IOException { List<Enumeration<URL>> enumerations = new ArrayList<Enumeration<URL>>(parents.size() + 1); for (ClassLoader parent : parents) { enumerations.add(parent.getResources(name)); } enumerations.add(super.getResources(name)); return new CompoundEnumeration(enumerations); } }
MultipleParentClassLoader extends InjectionClassLoader { public Enumeration<URL> getResources(String name) throws IOException { List<Enumeration<URL>> enumerations = new ArrayList<Enumeration<URL>>(parents.size() + 1); for (ClassLoader parent : parents) { enumerations.add(parent.getResources(name)); } enumerations.add(super.getResources(name)); return new CompoundEnumeration(enumerations); } MultipleParentClassLoader(List<? extends ClassLoader> parents);  MultipleParentClassLoader(ClassLoader parent, List<? extends ClassLoader> parents);  MultipleParentClassLoader(ClassLoader parent, List<? extends ClassLoader> parents, boolean sealed); }
MultipleParentClassLoader extends InjectionClassLoader { public Enumeration<URL> getResources(String name) throws IOException { List<Enumeration<URL>> enumerations = new ArrayList<Enumeration<URL>>(parents.size() + 1); for (ClassLoader parent : parents) { enumerations.add(parent.getResources(name)); } enumerations.add(super.getResources(name)); return new CompoundEnumeration(enumerations); } MultipleParentClassLoader(List<? extends ClassLoader> parents);  MultipleParentClassLoader(ClassLoader parent, List<? extends ClassLoader> parents);  MultipleParentClassLoader(ClassLoader parent, List<? extends ClassLoader> parents, boolean sealed); URL getResource(String name); Enumeration<URL> getResources(String name); }
MultipleParentClassLoader extends InjectionClassLoader { public Enumeration<URL> getResources(String name) throws IOException { List<Enumeration<URL>> enumerations = new ArrayList<Enumeration<URL>>(parents.size() + 1); for (ClassLoader parent : parents) { enumerations.add(parent.getResources(name)); } enumerations.add(super.getResources(name)); return new CompoundEnumeration(enumerations); } MultipleParentClassLoader(List<? extends ClassLoader> parents);  MultipleParentClassLoader(ClassLoader parent, List<? extends ClassLoader> parents);  MultipleParentClassLoader(ClassLoader parent, List<? extends ClassLoader> parents, boolean sealed); URL getResource(String name); Enumeration<URL> getResources(String name);  }