Class ArrayUtils
java.lang.Object
org.springframework.data.r2dbc.support.ArrayUtils
Utilities for array interaction.
- Author:
- Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?>
getArrayClass
(Class<?> componentType, int dimensions) Create a new empty array with the given number ofdimensions
.static int
getDimensionDepth
(Class<?> arrayClass) Determine the number of dimensions for anarrayClass
.static int
getDimensionDepth
(Object value) Determine the number of dimensions for an array object.
-
Method Details
-
getDimensionDepth
Determine the number of dimensions for an array object.- Parameters:
value
- the array to inspect, must not be null.- Returns:
- number of dimensions.
-
getDimensionDepth
Determine the number of dimensions for anarrayClass
.- Parameters:
arrayClass
- the array type to inspect, must not be null.- Returns:
- number of dimensions.
-
getArrayClass
Create a new empty array with the given number ofdimensions
.- Parameters:
componentType
- array component type.dimensions
- number of dimensions (depth).- Returns:
- a new empty array with the given number of
dimensions
.
-