Set<String> pathFilters = new HashSet<String>(), packageFilters = new HashSet<String>(); pathFilters.add("stripes"); packageFilters.add("net.sourceforge.stripes.*"); Set<Class<SimpleError>> impls = ResolverUtil.getImplementations(SimpleError.class, pathFilters, packageFilters);
Set<String> pathFilters = Literal.set("stripes"), packageFilters = Literal.set("net.sourceforge.stripes.*");  ResolverUtil<SimpleError> resolver = new ResolverUtil<SimpleError>(); resolver.setLocationFilters(pathFilters); resolver.setPackageFilters(packageFilters); resolver.loadImplementationsFromContextClassloader(SimpleError.class);  Set<Class<? extends SimpleError>> impls = resolver.getClasses();
    public void testFindExtensionsOfClass() throws Exception {        Set<String> pathFilters = new HashSet<String>(), packageFilters = new HashSet<String>();        pathFilters.add("stripes");        packageFilters.add("net.sourceforge.stripes.*");        Set<Class<SimpleError>> impls = ResolverUtil.getImplementations(SimpleError.class,                                                                          pathFilters,                                                                          packageFilters);        Assert.assertTrue(impls.contains(LocalizableError.class),                          "LocalizableError should have been found.");        Assert.assertTrue(impls.contains(ScopedLocalizableError.class),                          "ScopedLocalizableError should have been found.");        Assert.assertTrue(impls.contains(SimpleError.class),                          "SimpleError itself should have been found.");    }