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).
| 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. |
Adds implementation-specific extension classes to the scan sets.
Returns the cached extension methods for the supplied class loader. Each list is immutable and indexed by method name.
Returns the system property used to disable selected extension methods.
Returns a predicate that excludes methods from the cache.
Maps an extension method to the cache key used during lookup.