Package org.codehaus.groovy.runtime
Class ArrayTypeUtils
java.lang.Object
org.codehaus.groovy.runtime.ArrayTypeUtils
Utilities for handling array types
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Calculate the dimension of arraystatic int
Calculate the dimension of arraystatic Class
elementType
(Class clazz) Get the type of array elementsstatic Class
elementType
(Class clazz, int dim) Get the type of array elements by the dimensionstatic ClassNode
elementType
(ClassNode clazz) Get the type of array elements
-
Constructor Details
-
ArrayTypeUtils
public ArrayTypeUtils()
-
-
Method Details
-
dimension
Calculate the dimension of array- Parameters:
clazz
- the type of array- Returns:
- the dimension of array
-
dimension
Calculate the dimension of array- Parameters:
clazz
- the type of array- Returns:
- the dimension of array
-
elementType
Get the type of array elements- Parameters:
clazz
- the type of array- Returns:
- the type of elements
-
elementType
Get the type of array elements- Parameters:
clazz
- the type of array- Returns:
- the type of elements
-
elementType
Get the type of array elements by the dimension- Parameters:
clazz
- the type of arraydim
- the target dimension- Returns:
- the result array
-