1final ClassLoader loader = Thread.currentThread().getContextClassLoader();
2
3for (final ClassPath.ClassInfo info : ClassPath.from(loader).getTopLevelClasses()) {
4 if (info.getName().startsWith("my.package.")) {
5 final Class<?> clazz = info.load();
6 // do something with your clazz
7 }
8}
9