public abstract class ArrayUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Class<?> |
getArrayClass(Class<?> componentType,
int dimensions)
Create a new empty array with the given number of
dimensions . |
static int |
getDimensionDepth(Class<?> arrayClass)
Determine the number of dimensions for an
arrayClass . |
static int |
getDimensionDepth(Object value)
Determine the number of dimensions for an array object.
|
public static int getDimensionDepth(Object value)
value
- the array to inspect, must not be null.public static int getDimensionDepth(Class<?> arrayClass)
arrayClass
.arrayClass
- the array type to inspect, must not be null.public static Class<?> getArrayClass(Class<?> componentType, int dimensions)
dimensions
.componentType
- array component type.dimensions
- number of dimensions (depth).dimensions
.Copyright © 2018–2022 Pivotal Software, Inc.. All rights reserved.