BundleWiring bw = b.adapt(BundleWiring.class);
Collection<String> resources = bw.listResources("/", "*.class",
BundleWiring.LISTRESOURCES_LOCAL | BundleWiring.LISTRESOURCES_RECURSE);
Collection<String> classes = new ArrayList<String>();
ClassLoader cl = new TempBundleDelegatingClassLoader(b, this.getClass().getClassLoader());
for(String s : resources) {
s = s.replace('/', '.').substring(0, s.length() - 6);
try {
Class<?> clazz = Class.forName(s, false, cl);