May 2001
Intermediate to advanced
1088 pages
30h 13m
English
| Q1: | Why can't I find the method I'm looking for? |
| If the method was defined in a superclass of the one you're using, make sure you use getMethod instead of getDeclaredMethod. Second, double-check the array of method parameters and make sure you are using the correct types. Remember to use .TYPE to get native types. |
| Q1: | When a method throws an exception, why do I get an InvocationTargetException instead of the real exception? |
| That's just the way Reflection works. Call getTargetException on the InvocationTargetException to get the underlying exception. |
Read now
Unlock full access