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.
| Modifiers | Name | Description |
|---|---|---|
static ExtensionMethodCache |
INSTANCE |
Shared cache instance used by static type checking. |
| 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. |
| Methods inherited from class | Name |
|---|---|
class AbstractExtensionMethodCache |
addAdditionalClassesToScan, get, getDisablePropertyName, getMethodFilter, getMethodMapper |
Shared cache instance used by static type checking.
Adds the built-in extension classes used during static type checking.
Returns the system property that disables extension methods.
Returns the filter that excludes deprecated extension methods.
Maps extension methods to their receiver type names.