vendredi 19 août 2022

find all java classes on classpath whose simple name matches some regex

I would like to search the runtime classpath to find all classes with a simple name that matches some regex.

Example:
Say I have Some.jar on my classpath and that jar contains a class called MyCoolClass.class. I would like some way of finding all classes that contains the word "Cool" like the one above and perhaps several others.

Also, I would like to get either the Class or the fully qualified class name (such that I can call Class.forName).





Aucun commentaire:

Enregistrer un commentaire