Package: org.codehaus.groovy.reflection.stdclasses

## [Java] Class BigDecimalCachedClass

- org.codehaus.groovy.reflection.stdclasses.BigDecimalCachedClass

-     public class BigDecimalCachedClass
      extends DoubleCachedClass

  Provides optimized reflection caching for BigDecimal. Coerces numeric arguments to BigDecimal for type-safe method invocation.

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

  - ### Constructor Summary

    Constructors
    Constructor and description
    `BigDecimalCachedClass(Class klazz, ClassInfo classInfo)` Constructs a cached class representation for BigDecimal.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Object` | `coerceArgument(Object argument)` Coerces the given numeric argument to BigDecimal.
    `` | `public boolean` | `isDirectlyAssignable(Object argument)` Checks if the given argument is directly assignable to BigDecimal.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class DoubleCachedClass` | `coerceArgument, isAssignableFrom, isDirectlyAssignable`
    `class NumberCachedClass` | `coerceArgument, isAssignableFrom`
    `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 BigDecimalCachedClass(Class klazz, ClassInfo classInfo)

      Constructs a cached class representation for BigDecimal.

      Parameters:
        `klazz` - the BigDecimal class to cache
        `classInfo` - the class information associated with this cached class

  - ### Method Detail

    - #### public Object coerceArgument(Object argument)

      Coerces the given numeric argument to BigDecimal.

      Parameters:
        `argument` - the argument to coerce
      Returns:
        the argument as a BigDecimal, or the original argument if not a number

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

      Checks if the given argument is directly assignable to BigDecimal.

      Parameters:
        `argument` - the argument to check
      Returns:
        `true` if the argument is an instance of BigDecimal, `false` otherwise