Class NullChecker
- java.lang.Object
-
- com.opencloud.slee.upgrade.transformation.util.NullChecker
-
public class NullChecker extends java.lang.Object
Utility methods for checking whether values are null.
-
-
Constructor Summary
Constructors Constructor Description NullChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
checkNotNull(T obj, java.lang.String name)
Returns the given object unchanged, throwing aNullPointerException
if it is null.
-
-
-
Method Detail
-
checkNotNull
@Nonnull public static <T> T checkNotNull(@Nonnull T obj, @Nonnull java.lang.String name) throws java.lang.NullPointerException
Returns the given object unchanged, throwing aNullPointerException
if it is null.- Parameters:
obj
- The object which should be non-nullname
- The variable name to use in the generatedNullPointerException
- Returns:
- The given object, unchanged
- Throws:
java.lang.NullPointerException
-
-