Improve reflection IllegalArgumentException detail messages.

Also add a missing InstanceOf check that was causing CheckJNI to kill us
if someone tried to pass an inappropriate reference type through
Method.invoke. (Amusingly, CheckJNI produced pretty much the exact detail
message that Method.invoke should have.)

Plus a new test for this stuff.

Bug: 6504175
Change-Id: Ice95eecbdba5a0927c6eaf68e56d6500dc52ad2e
8 files changed
tree: c2d0f408237ad5a30bfd67819e5c9a72cc3ac45e
  1. .gitignore
  2. Android.mk
  3. build/
  4. jdwpspy/
  5. src/
  6. test/
  7. tools/