public class CachedClosureClass
extends CachedClass
Provides optimized reflection caching for Groovy Closure classes.
Analyzes closure doCall methods to determine parameter types and maximum parameters.
| Fields inherited from class | Fields |
|---|---|
class CachedClass |
EMPTY_ARRAY, classInfo, isArray, isInterface, isNumber, isPrimitive, modifiers, mopMethods |
| Constructor and description |
|---|
CachedClosureClass(Class klazz, ClassInfo classInfo)Constructs a cached class representation for a closure class. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public int |
getMaximumNumberOfParameters()Returns the maximum number of parameters accepted by the closure's doCall methods. |
|
public Class[] |
getParameterTypes()Returns the parameter types of the closure's doCall method with maximum parameters. |
| 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 |
Constructs a cached class representation for a closure class.
Inspects the closure's doCall methods to extract parameter metadata.
klazz - the closure class to cacheclassInfo - the class information associated with this cached class Returns the maximum number of parameters accepted by the closure's doCall methods.
0 if no doCall method was found Returns the parameter types of the closure's doCall method with maximum parameters.
null if no doCall method was foundCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.