Package: org.codehaus.groovy.reflection.stdclasses

## [Java] Class ArrayCachedClass

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

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class CachedClass` | `EMPTY_ARRAY, classInfo, isArray, isInterface, isNumber, isPrimitive, modifiers, mopMethods`

  - ### Constructor Summary

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

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Object` | `coerceArgument(Object argument)` Coerces the given argument to the appropriate array type.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class CachedClass` | `addNewMopMethods, coerceArgument, 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 Detail

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

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

      Parameters:
        `argument` - the argument to coerce
      Returns:
        the coerced argument, or the original argument if no coercion is needed