Class ArrayCachedClass
java.lang.Object
org.codehaus.groovy.reflection.CachedClass
org.codehaus.groovy.reflection.stdclasses.ArrayCachedClass
-
Nested Class Summary
Nested classes/interfaces inherited from class org.codehaus.groovy.reflection.CachedClass
CachedClass.CachedMethodComparatorByName, CachedClass.CachedMethodComparatorWithString -
Field Summary
Fields inherited from class org.codehaus.groovy.reflection.CachedClass
classInfo, EMPTY_ARRAY, isArray, isInterface, isNumber, isPrimitive, modifiers, mopMethods -
Constructor Summary
ConstructorsConstructorDescriptionArrayCachedClass(Class klazz, ClassInfo classInfo) Constructs a cached class representation for the given array class. -
Method Summary
Modifier and TypeMethodDescriptioncoerceArgument(Object argument) Coerces the given argument to the appropriate array type.Methods inherited from class org.codehaus.groovy.reflection.CachedClass
addNewMopMethods, getCachedClass, getCachedSuperClass, getCallSiteLoader, getConstructors, getDeclaredInterfaces, getFields, getHierarchy, getInterfaces, getMethods, getModifiers, getName, getNewMetaMethods, getSuperClassDistance, getTheClass, getTypeDescription, hashCode, isAssignableFrom, isDirectlyAssignable, isInterface, isPrimitive, isVoid, searchMethods, setNewMopMethods, toString
-
Constructor Details
-
ArrayCachedClass
Constructs a cached class representation for the given array class.- Parameters:
klazz- the array class to cacheclassInfo- the class information associated with this cached class
-
-
Method Details
-
coerceArgument
Coerces the given argument to the appropriate array type. Converts boxed arrays to primitive arrays if needed, andGStringarrays toStringarrays.- Overrides:
coerceArgumentin classCachedClass- Parameters:
argument- the argument to coerce- Returns:
- the coerced argument, or the original argument if no coercion is needed
-