Package org.codehaus.groovy.runtime

# Class ArrayTypeUtils

java.lang.Object
org.codehaus.groovy.runtime.ArrayTypeUtils

    public class ArrayTypeUtils
    extends Object

Utilities for handling array types

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `ArrayTypeUtils()` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `static int` | `dimension​(Class clazz)` | Calculate the dimension of array
  `static Class` | `elementType​(Class clazz)` | Get the type of array elements
  `static Class` | `elementType​(Class clazz, int dim)` | Get the type of array elements by the dimension

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ArrayTypeUtils

    public ArrayTypeUtils()

- ## Method Details

  - ### dimension

    public static int dimension​(Class clazz)
    Calculate the dimension of array
    Parameters:
      `clazz` - the type of array
    Returns:
      the dimension of array

  - ### elementType

    public static Class elementType​(Class clazz)
    Get the type of array elements
    Parameters:
      `clazz` - the type of array
    Returns:
      the type of elements

  - ### elementType

    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