Package org.codehaus.groovy.reflection.stdclasses

# Class ArrayCachedClass

java.lang.Object
org.codehaus.groovy.reflection.CachedClass
org.codehaus.groovy.reflection.stdclasses.ArrayCachedClass

public class ArrayCachedClass extends CachedClass
Provides optimized reflection caching for Java arrays. Handles type coercion including conversion of boxed arrays to primitive arrays, and `GString` arrays to `String` arrays.

- ## 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

  Constructors
  Constructor
  Description
  `ArrayCachedClass(Class klazz, ClassInfo classInfo)`
  Constructs a cached class representation for the given array class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `coerceArgument(Object argument)`
  Coerces the given argument to the appropriate array type.

  ### Methods inherited from class org.codehaus.groovy.reflection.CachedClass

  `addNewMopMethods, getCachedClass, getCachedSuperClass, getConstructors, getDeclaredInterfaces, getFields, getHierarchy, getInterfaces, getMethods, getModifiers, getName, getNewMetaMethods, getSuperClassDistance, getTheClass, getTypeDescription, hashCode, isAssignableFrom, isDirectlyAssignable, isInterface, isPrimitive, isVoid, searchMethods, setNewMopMethods, toString`

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

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

- ## Constructor Details

  - ### ArrayCachedClass

    public ArrayCachedClass(Class klazz, ClassInfo classInfo)
    Constructs a cached class representation for the given array class.
    Parameters:
      `klazz` - the array class to cache
      `classInfo` - the class information associated with this cached class

- ## Method Details

  - ### coerceArgument

    public Object coerceArgument(Object argument)
    Coerces the given argument to the appropriate array type. Converts boxed arrays to primitive arrays if needed, and `GString` arrays to `String` arrays.
    Overrides:
      `coerceArgument` in class `CachedClass`
    Parameters:
      `argument` - the argument to coerce
    Returns:
      the coerced argument, or the original argument if no coercion is needed