Class ExtensionMethodCache
java.lang.Object
org.codehaus.groovy.transform.stc.AbstractExtensionMethodCache
org.codehaus.groovy.transform.stc.ExtensionMethodCache
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExtensionMethodCacheShared cache instance used by static type checking. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAdditionalClassesToScan(Set<Class> instanceExtClasses, Set<Class> staticExtClasses) Adds the built-in extension classes used during static type checking.protected StringReturns the system property that disables extension methods.protected Predicate<MethodNode>Returns the filter that excludes deprecated extension methods.protected Function<MethodNode,String> Maps extension methods to their receiver type names.Methods inherited from class org.codehaus.groovy.transform.stc.AbstractExtensionMethodCache
get
-
Field Details
-
INSTANCE
Shared cache instance used by static type checking.
-
-
Method Details
-
addAdditionalClassesToScan
protected void addAdditionalClassesToScan(Set<Class> instanceExtClasses, Set<Class> staticExtClasses) Adds the built-in extension classes used during static type checking.- Specified by:
addAdditionalClassesToScanin classAbstractExtensionMethodCache
-
getDisablePropertyName
Returns the system property that disables extension methods.- Specified by:
getDisablePropertyNamein classAbstractExtensionMethodCache
-
getMethodFilter
Returns the filter that excludes deprecated extension methods.- Specified by:
getMethodFilterin classAbstractExtensionMethodCache
-
getMethodMapper
Maps extension methods to their receiver type names.- Specified by:
getMethodMapperin classAbstractExtensionMethodCache
-