ArrayTypeUtils (Groovy 5.0.7)

Package: org.codehaus.groovy.runtime

## [Java] Class ArrayTypeUtils

- org.codehaus.groovy.runtime.ArrayTypeUtils

-     public class ArrayTypeUtils
      extends Object

  Utilities for handling array types

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static int` | `dimension(Class clazz)` Calculate the dimension of array
    `` | `public static int` | `dimension(ClassNode clazz)` Calculate the dimension of array
    `` | `public static Class` | `elementType(Class clazz)` Get the type of array elements
    `` | `public static ClassNode` | `elementType(ClassNode clazz)` Get the type of array elements
    `` | `public static Class` | `elementType(Class clazz, int dim)` Get the type of array elements by the dimension

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### public static int dimension(Class clazz)

      Calculate the dimension of array

      Parameters:
        `clazz` - the type of array
      Returns:
        the dimension of array

    - #### public static int dimension(ClassNode clazz)

      Calculate the dimension of array

      Parameters:
        `clazz` - the type of array
      Returns:
        the dimension of array

    - #### public static Class elementType(Class clazz)

      Get the type of array elements

      Parameters:
        `clazz` - the type of array
      Returns:
        the type of elements

    - #### public static ClassNode elementType(ClassNode clazz)

      Get the type of array elements

      Parameters:
        `clazz` - the type of array
      Returns:
        the type of elements

    - #### public static Class elementType(Class clazz, int dim)

      Get the type of array elements by the dimension

      Parameters:
        `clazz` - the type of array
        `dim` - the target dimension
      Returns:
        the result array