public class ClassUtils
extends java.lang.Object
| Constructor | Description |
|---|---|
ClassUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
arrayToString(java.lang.Object array) |
Returns the given Array in a string representation.
|
static java.lang.String |
arrayToString(java.lang.Object array,
boolean outputClass) |
Returns the given Array in a string representation.
|
static java.lang.String |
flatten(java.lang.Object[] lines,
java.lang.String sep) |
Flattens the array into a single, long string.
|
static java.lang.String |
flatten(java.util.List lines,
java.lang.String sep) |
Flattens the list into a single, long string.
|
static java.lang.Class |
getArrayClass(java.lang.Class c) |
Returns the basic class of an array class (handles multi-dimensional
arrays).
|
static int |
getArrayDimensions(java.lang.Class array) |
Returns the dimensions of the given array.
|
static int |
getArrayDimensions(java.lang.Object array) |
Returns the dimensions of the given array.
|
public static java.lang.Class getArrayClass(java.lang.Class c)
c - the array to inspectpublic static int getArrayDimensions(java.lang.Class array)
array - the array to determine the dimensions forpublic static int getArrayDimensions(java.lang.Object array)
array - the array to determine the dimensions forpublic static java.lang.String arrayToString(java.lang.Object array,
boolean outputClass)
array - the array to return in a string representationoutputClass - whether to output the class name instead of calling
the object's "toString()" methodpublic static java.lang.String arrayToString(java.lang.Object array)
array - the array to return in a string representationpublic static java.lang.String flatten(java.util.List lines,
java.lang.String sep)
lines - the lines to flattensep - the separatorpublic static java.lang.String flatten(java.lang.Object[] lines,
java.lang.String sep)
lines - the lines to flattensep - the separatorCopyright © 2018 University of Waikato, Hamilton, NZ. All Rights Reserved.