samedi 30 novembre 2019

How to find classes which extend class X and check if a try/catch block is used anywhere inside them in Java

I am currently looking to write some Java code that does the following:

  1. Find particular classes in the package which extend X class
  2. Check if a try/catch block is used anywhere inside them (or more specifically if .getStackTrace() is called off a caught exception but overall if I find 'try/catch' usage that would be good enough)
  3. Keep track of the classes which satisfy the condition and return list of their names

Any help or suggestion is appreciated :-)





Aucun commentaire:

Enregistrer un commentaire