public class ExtensionModuleRegistry
extends Object
The extension method registry is responsible for collecting methods (or static methods) which are added to existing classes and may be called like regular methods.
In previous Groovy versions, such methods could only be defined in a single class called DefaultGroovyMethods for instance methods, and DefaultGroovyStaticMethods for static methods.
| Constructor and description |
|---|
ExtensionModuleRegistry()Constructs a new ExtensionModuleRegistry with an empty module list. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
addModule(ExtensionModule module)Adds an extension module to this registry. |
|
public ExtensionModule |
getModule(String moduleName)Retrieves a registered extension module by its name. |
|
public List<ExtensionModule> |
getModules()Returns a copy of the list of all registered extension modules. |
|
public boolean |
hasModule(String moduleName)Checks if an extension module with the given name is registered. |
|
public void |
removeModule(ExtensionModule module)Removes an extension module from this registry. |
Constructs a new ExtensionModuleRegistry with an empty module list.
Adds an extension module to this registry.
module - the extension module to addRetrieves a registered extension module by its name.
moduleName - the name of the module to retrieveReturns a copy of the list of all registered extension modules.
Checks if an extension module with the given name is registered.
moduleName - the name of the module to checkRemoves an extension module from this registry.
module - the extension module to removeCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.