Class ArrayUtils

java.lang.Object
org.springframework.data.r2dbc.support.ArrayUtils

public abstract class ArrayUtils extends Object
Utilities for array interaction.
Author:
Mark Paluch
  • Method Details

    • getDimensionDepth

      public static int getDimensionDepth(Object value)
      Determine the number of dimensions for an array object.
      Parameters:
      value - the array to inspect, must not be null.
      Returns:
      number of dimensions.
    • getDimensionDepth

      public static int getDimensionDepth(Class<?> arrayClass)
      Determine the number of dimensions for an arrayClass.
      Parameters:
      arrayClass - the array type to inspect, must not be null.
      Returns:
      number of dimensions.
    • getArrayClass

      public static Class<?> getArrayClass(Class<?> componentType, int dimensions)
      Create a new empty array with the given number of dimensions.
      Parameters:
      componentType - array component type.
      dimensions - number of dimensions (depth).
      Returns:
      a new empty array with the given number of dimensions.