Package com.epam.reportportal.utils
Class ObjectUtils
- java.lang.Object
-
- com.epam.reportportal.utils.ObjectUtils
-
public class ObjectUtils extends java.lang.ObjectA class for auxiliary manipulations with objects.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TclonePojo(T pojoObject, java.lang.Class<T> clazz)Clone POJO object through ObjectMapper to avoid implementation of clone method and model modification.static java.lang.StringtoString(java.lang.Object pojoObject)Convert POJO object through ObjectMapper to a string.
-
-
-
Method Detail
-
toString
@Nonnull public static java.lang.String toString(@Nonnull java.lang.Object pojoObject)Convert POJO object through ObjectMapper to a string.- Parameters:
pojoObject- an object to convert- Returns:
- representation of the object
-
clonePojo
@Nonnull public static <T> T clonePojo(@Nonnull T pojoObject, java.lang.Class<T> clazz)Clone POJO object through ObjectMapper to avoid implementation of clone method and model modification.- Type Parameters:
T- the clone object type- Parameters:
pojoObject- an object to cloneclazz- the clone object type- Returns:
- cloned object
-
-