Package org.codehaus.groovy.reflection
Class ReflectionCache
java.lang.Object
org.codehaus.groovy.reflection.ReflectionCache
Central registry for obtaining cached class information.
Provides factory methods for retrieving CachedClass instances for a given Java class.
Maintains static references to commonly-used classes for efficient access.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CachedClassThe cached representation ofObject[].class.static final CachedClassThe cached representation ofObject.class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CachedClassgetCachedClass(Class klazz) Retrieves theCachedClassfor the given Java class.
-
Field Details
-
OBJECT_CLASS
The cached representation ofObject.class. Frequently accessed during type compatibility checks. -
OBJECT_ARRAY_CLASS
The cached representation ofObject[].class. Used as the superclass for non-primitive array types.
-
-
Constructor Details
-
ReflectionCache
public ReflectionCache()
-
-
Method Details
-
getCachedClass
Retrieves theCachedClassfor the given Java class. Returnsnullif the class isnull.- Parameters:
klazz- the Java class for which to obtain cache information- Returns:
- the cached class information, or
nullifklazzisnull
-