Signature tests: catch and log NoClassDefFoundError

Avoids failing the tests if a NoClassDefFoundError is detected when
attempting to retrieve a class or its constructors, methods or fields
using reflection. Instead log the failure and continue.

This should not make the tests any less rigorous or risk allowing
access to implementation details of the platform as if the test cannot
retrieve them using reflection then an app will be unable to do so
either.

Bug: 206650495
Test: m CtsSystemApiAnnotationTestCases
Merged-In: I94716a359aaa8c88429143130566ec4db13a7ad8
Change-Id: I94716a359aaa8c88429143130566ec4db13a7ad8
(cherry picked from commit 4dbc2330349f6002cc11be4d2cefe5aa9c4c1a7d)
4 files changed