By the way, there is no available API so that one can write
If an object is not accessible and setAccessible on the object will succeed call setAccessible That means that the code needs to call setAccessible and handle the exception, which triggers a warning.