Mega Code Archive

 
Categories / Java Book / 008 Reflection
 

0453 Get declared exceptions

Class<?>[] getExceptionTypes() Returns an array of Class objects that represent the types of the exceptions declared to be thrown by the underlying method represented by this Method object. Type[] getGenericExceptionTypes() Returns an array of Type objects that represent the exceptions declared to be thrown by this Method object.