Package xyz.dynxsty.dih4jda.util
Class Checks
java.lang.Object
xyz.dynxsty.dih4jda.util.Checks
Utility class for checking certain conditions.
- Since:
- v1.4
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckEmptyConstructor(Class<?> base) Checks if the given class has an empty constructor.static booleancheckImplementation(Class<?> base, Class<?> implementation) Checks if the given base class implements a certain class.static voidThrows anIllegalArgumentExceptionif the givenObjectis null.
-
Method Details
-
checkImplementation
Checks if the given base class implements a certain class.- Parameters:
base- The base class.implementation- The implementation that should be checked.- Returns:
- Whether the base class is implementing the given class.
- Since:
- v1.4
-
checkEmptyConstructor
Checks if the given class has an empty constructor.- Parameters:
base- The class to check.- Returns:
- Whether the class has an empty constructor.
- Since:
- v1.5.1
-
notNull
Throws anIllegalArgumentExceptionif the givenObjectis null.- Parameters:
argument- TheObjectto check.name- The name of theObject.- Throws:
IllegalArgumentException- if the given argument is null.
-