Skip to content

Instantly share code, notes, and snippets.

@mbigatti
Created June 17, 2019 14:57
Show Gist options
  • Save mbigatti/7e82d5a6cdb7bbcb84746ed01019304c to your computer and use it in GitHub Desktop.
Save mbigatti/7e82d5a6cdb7bbcb84746ed01019304c to your computer and use it in GitHub Desktop.
Dump Java classes using Guava
ClassPath cp = ClassPath.from(this.getClass().getClassLoader());
cp.getAllClasses().stream()
.filter(ci -> ci.getName().startsWith("com.example"))
.forEach(ci -> System.err.println(ci.getName()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment