Package: org.codehaus.groovy.reflection.stdclasses

## [Java] Class CharacterCachedClass

- org.codehaus.groovy.reflection.stdclasses.CharacterCachedClass

-     public class CharacterCachedClass
      extends CachedClass

  Provides optimized reflection caching for `char` and Character. Optionally allows `null` values for the boxed Character class variant.

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

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CharacterCachedClass(Class klazz, ClassInfo classInfo, boolean allowNull)` Constructs a cached class representation for the given character class.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `isAssignableFrom(Class classToTransformFrom)` Determines if the given class can be transformed to char/Character.
    `` | `public boolean` | `isDirectlyAssignable(Object argument)` Checks if the given argument is directly assignable without type conversion.

  - ### 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 CharacterCachedClass(Class klazz, ClassInfo classInfo, boolean allowNull)

      Constructs a cached class representation for the given character class.

      Parameters:
        `klazz` - the character class to cache (either `char.class` or Character.class)
        `classInfo` - the class information associated with this cached class
        `allowNull` - `true` to allow `null` values (for Character.class), `false` for primitive `char`

  - ### Method Detail

    - #### public boolean isAssignableFrom(Class classToTransformFrom)

      Determines if the given class can be transformed to char/Character.

      Parameters:
        `classToTransformFrom` - the source class to check
      Returns:
        `true` if the class can be transformed to char, `false` otherwise

    - #### public boolean isDirectlyAssignable(Object argument)

      Checks if the given argument is directly assignable without type conversion.

      Parameters:
        `argument` - the argument to check
      Returns:
        `true` if the argument is a Character instance, or `null` is allowed, `false` otherwise