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 boolean
checkEmptyConstructor
(Class<?> base) Checks if the given class has an empty constructor.static boolean
checkImplementation
(Class<?> base, Class<?> implementation) Checks if the given base class implements a certain class.static void
Throws anIllegalArgumentException
if the givenObject
is 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 anIllegalArgumentException
if the givenObject
is null.- Parameters:
argument
- TheObject
to check.name
- The name of theObject
.- Throws:
IllegalArgumentException
- if the given argument is null.
-