Package org.jboss.weld.util
Class Preconditions
java.lang.Object
org.jboss.weld.util.Preconditions
- Author:
- Jozef Hartinger
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckArgument(boolean condition, Object argument) static voidcheckArgument(boolean condition, String message) static voidcheckArgumentNotNull(Object reference) ThrowsIllegalArgumentExceptionif the reference is null.static voidcheckArgumentNotNull(Object reference, String argumentName) ThrowsIllegalArgumentExceptionwith an appropriate message if the reference is null.static voidcheckNotNull(Object reference)
-
Method Details
-
checkArgumentNotNull
ThrowsIllegalArgumentExceptionwith an appropriate message if the reference is null.- Parameters:
reference- the reference to be checkedargumentName- name of the argument that is being checked. The name used in the error message.
-
checkArgumentNotNull
ThrowsIllegalArgumentExceptionif the reference is null. This method should only be used for methods with single argument.- Parameters:
reference- the reference to be checked
-
checkNotNull
- Parameters:
reference- The reference to be checked- Throws:
NullPointerException- if the reference is null
-
checkArgument
-
checkArgument
-