public class NumberCachedClass
extends CachedClass
Base class for optimized reflection caching of numeric types. Provides common type coercion logic for primitive and boxed numeric types, as well as BigInteger and BigDecimal.
| Fields inherited from class | Fields |
|---|---|
class CachedClass |
EMPTY_ARRAY, classInfo, isArray, isInterface, isNumber, isPrimitive, modifiers, mopMethods |
| Constructor and description |
|---|
NumberCachedClass(Class klazz, ClassInfo classInfo)Constructs a cached class representation for a numeric class. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Object |
coerceArgument(Object argument)Coerces the given argument if it is a Number. |
|
public boolean |
isAssignableFrom(Class classToTransformFrom)Determines if the given class can be transformed to this numeric type. |
| 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 |
Coerces the given argument if it is a Number. Delegates to coerceNumber for specialized conversion logic.
argument - the argument to coerce Determines if the given class can be transformed to this numeric type.
Accepts null, Number subclasses, and primitive numeric types.
classToTransformFrom - the source class to checktrue if the class can be transformed to this numeric type, false otherwiseCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.