Class ClassSupport
- java.lang.Object
-
- org.junit.platform.commons.support.ClassSupport
-
@API(status=MAINTAINED, since="1.1") public final class ClassSupport extends java.lang.Object
Common class support.- Since:
- 1.1
- See Also:
AnnotationSupport
,ReflectionSupport
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
nullSafeToString(java.lang.Class<?>... classes)
Generate a comma-separated list of fully qualified class names for the supplied classes.static java.lang.String
nullSafeToString(java.util.function.Function<? super java.lang.Class<?>,? extends java.lang.String> mapper, java.lang.Class<?>... classes)
Generate a comma-separated list of mapped values for the supplied classes.
-
-
-
Method Detail
-
nullSafeToString
public static java.lang.String nullSafeToString(java.lang.Class<?>... classes)
Generate a comma-separated list of fully qualified class names for the supplied classes.- Parameters:
classes
- the classes whose names should be included in the generated string- Returns:
- a comma-separated list of fully qualified class names, or an empty
string if the supplied class array is
null
or empty - See Also:
nullSafeToString(Function, Class...)
-
nullSafeToString
public static java.lang.String nullSafeToString(java.util.function.Function<? super java.lang.Class<?>,? extends java.lang.String> mapper, java.lang.Class<?>... classes)
Generate a comma-separated list of mapped values for the supplied classes.The values are generated by the supplied
mapper
(e.g.,Class::getName
,Class::getSimpleName
, etc.), unless a class reference isnull
in which case it will be mapped to"null"
.- Parameters:
mapper
- the mapper to useclasses
- the classes to map- Returns:
- a comma-separated list of mapped values, or an empty string if
the supplied class array is
null
or empty - See Also:
nullSafeToString(Class...)
-
-