Package org.apache.webbeans.util
Class Asserts
- java.lang.Object
-
- org.apache.webbeans.util.Asserts
-
public final class Asserts extends Object
Simple utility classes with some assertions methods.- Since:
- 1.0
- Author:
- Gurkan Erdogdu
-
-
Field Summary
Fields Modifier and Type Field Description static StringPARAM_NAME_ANNOTATIONstatic StringPARAM_NAME_WEBBEANSCONTEXT
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidassertNotNull(Object obj)Check the object is null or notstatic voidassertNotNull(Object obj, String parameterName)Check the object is null or notstatic voidnullCheckForClass(Class<?> clazz)Null check for class parameter.static voidnullCheckForClass(Class<?> clazz, String message)Null check for class parameter.static voidnullCheckForMethod(Method method)Null check for method parameter.
-
-
-
Field Detail
-
PARAM_NAME_WEBBEANSCONTEXT
public static final String PARAM_NAME_WEBBEANSCONTEXT
- See Also:
- Constant Field Values
-
PARAM_NAME_ANNOTATION
public static final String PARAM_NAME_ANNOTATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
assertNotNull
public static void assertNotNull(Object obj, String parameterName)
Check the object is null or not- Parameters:
obj- null check objectparameterName- name of parameter which may not be null
-
assertNotNull
public static void assertNotNull(Object obj)
Check the object is null or not- Parameters:
obj- null check object
-
nullCheckForClass
public static void nullCheckForClass(Class<?> clazz)
Null check for class parameter.- Parameters:
clazz- parameter
-
nullCheckForClass
public static void nullCheckForClass(Class<?> clazz, String message)
Null check for class parameter.- Parameters:
clazz- parameter
-
nullCheckForMethod
public static void nullCheckForMethod(Method method)
Null check for method parameter.- Parameters:
method- parameter
-
-