public static ProgramClassLoader newProgramClassLoader(File unpackedJarDir, Iterable<String> apiResourceList) throws IOException { Predicate<String> predicate = Predicates.in(Sets.newHashSet(apiResourceList)); ClassLoader filterParent = Objects.firstNonNull(Thread.currentThread().getContextClassLoader(), ClassLoaders.class.getClassLoader()); return new ProgramClassLoader(unpackedJarDir, new FilterClassLoader(predicate, filterParent)); }