Package: org.codehaus.groovy.transform.stc

## [Java] Class ExtensionMethodCache

- org.codehaus.groovy.transform.stc.ExtensionMethodCache

-     public class ExtensionMethodCache
      extends AbstractExtensionMethodCache

  This class is used to make extension methods lookup faster. Basically, it will only collect the list of extension methods (see ExtensionModule) if the list of extension modules has changed. It avoids recomputing the whole list each time we perform a method lookup. Cached lists are indexed by method name so the static type checker can collect DGM candidates without a linear scan of every method on the receiver type.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static ExtensionMethodCache` | `INSTANCE` | Shared cache instance used by static type checking.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected void` | `addAdditionalClassesToScan(Set<Class> instanceExtClasses, Set<Class> staticExtClasses)` Adds the built-in extension classes used during static type checking.
    `` | `protected String` | `getDisablePropertyName()` Returns the system property that disables extension methods.
    `` | `protected Predicate<MethodNode>` | `getMethodFilter()` Returns the filter that excludes deprecated extension methods.
    `` | `protected Function<MethodNode, String>` | `getMethodMapper()` Maps extension methods to their receiver type names.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractExtensionMethodCache` | `addAdditionalClassesToScan, get, getDisablePropertyName, getMethodFilter, getMethodMapper`

- - ### Field Detail

    - #### public static final ExtensionMethodCache INSTANCE

      Shared cache instance used by static type checking.

  - ### Method Detail

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

      Adds the built-in extension classes used during static type checking.

    - #### protected String getDisablePropertyName()

      Returns the system property that disables extension methods.

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

      Returns the filter that excludes deprecated extension methods.

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

      Maps extension methods to their receiver type names.