Package: org.codehaus.groovy.transform.stc

## [Java] Class AbstractExtensionMethodCache

- org.codehaus.groovy.transform.stc.AbstractExtensionMethodCache

-     public abstract class AbstractExtensionMethodCache
      extends Object

  Per-ClassLoader cache of extension methods (DGM and friends, or another mapper such as macro methods). Values are immutable lists that also carry a name index, so a named lookup does not scan every method stored under a receiver (there are hundreds on `Object`).

  Since:
    3.0.0

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected abstract void` | `addAdditionalClassesToScan(Set<Class> instanceExtClasses, Set<Class> staticExtClasses)` Adds implementation-specific extension classes to the scan sets.
    `` | `public final Map<String, List<MethodNode>>` | `get(ClassLoader loader)` Returns the cached extension methods for the supplied class loader.
    `` | `protected abstract String` | `getDisablePropertyName()` Returns the system property used to disable selected extension methods.
    `` | `protected abstract Predicate<MethodNode>` | `getMethodFilter()` Returns a predicate that excludes methods from the cache.
    `` | `protected abstract Function<MethodNode, String>` | `getMethodMapper()` Maps an extension method to the cache key used during lookup.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### protected abstract void addAdditionalClassesToScan(Set<Class> instanceExtClasses, Set<Class> staticExtClasses)

      Adds implementation-specific extension classes to the scan sets.

    - #### public final Map<String, List<MethodNode>> get(ClassLoader loader)

      Returns the cached extension methods for the supplied class loader. Each list is immutable and indexed by method name.

    - #### protected abstract String getDisablePropertyName()

      Returns the system property used to disable selected extension methods.

    - #### protected abstract Predicate<MethodNode> getMethodFilter()

      Returns a predicate that excludes methods from the cache.

    - #### protected abstract Function<MethodNode, String> getMethodMapper()

      Maps an extension method to the cache key used during lookup.