mercredi 31 mai 2017

Is it possible to check that class has static block (via reflection or other ways)?

For testing purposes I want to reload classes that have either static non-final fileds or static initialization blocks.

With static fields it is easy - I can check that class has it using reflection.

But how I can check that class has static block/blocks ? Don't want to operate with this blocks, just want to know are they here or not.





Aucun commentaire:

Enregistrer un commentaire