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 intCalculate the dimension of arraystatic intCalculate the dimension of arraystatic ClasselementType(Class clazz) Get the type of array elementsstatic ClasselementType(Class clazz, int dim) Get the type of array elements by the dimensionstatic ClassNodeelementType(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
-