当前位置: 动力学知识库 > 问答 > 编程问答 >

For a particular method, how can I view the checked exceptions in java using reflection?

问题描述:

For a particular method, how can I view the checked exceptions in java using reflection? There does not seem to be support for this in the JDK.

网友答案:

Use this method in Method:

public Type[] getGenericExceptionTypes()

Then you have to iterate through the types if you want to separate checked and unchecked exceptions.

分享给朋友:
您可能感兴趣的文章:
随机阅读: