Class ReflectionCache

java.lang.Object
org.codehaus.groovy.reflection.ReflectionCache

public class ReflectionCache extends Object
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 Details

    • OBJECT_CLASS

      public static final CachedClass OBJECT_CLASS
      The cached representation of Object.class. Frequently accessed during type compatibility checks.
    • OBJECT_ARRAY_CLASS

      public static final CachedClass OBJECT_ARRAY_CLASS
      The cached representation of Object[].class. Used as the superclass for non-primitive array types.
  • Constructor Details

    • ReflectionCache

      public ReflectionCache()
  • Method Details

    • getCachedClass

      public static CachedClass getCachedClass(Class klazz)
      Retrieves the CachedClass for the given Java class. Returns null if the class is null.
      Parameters:
      klazz - the Java class for which to obtain cache information
      Returns:
      the cached class information, or null if klazz is null