Created
January 19, 2017 14:18
-
-
Save kemsakurai/6e2cace634e9c356764337f3c7971cf2 to your computer and use it in GitHub Desktop.
classがデフォルトコンストラクターを保持するかBooleanで返す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean isExistsDefalutConstructor(Class<?> clazz) { | |
try { | |
clazz.getConstructor(null); | |
return true; | |
} catch (NoSuchMethodException e) { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment