Package org.codehaus.groovy.runtime.m12n
Class ExtensionModule
java.lang.Object
org.codehaus.groovy.runtime.m12n.ExtensionModule
- Direct Known Subclasses:
SimpleExtensionModule
An extension module is a class responsible for providing a list of
meta methods to the Groovy
compiler and runtime. Those methods are used to "dynamically extend" existing classes by adding methods to
existing classes.- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionExtensionModule(String moduleName, String moduleVersion) Constructs a new ExtensionModule with the specified name and version. -
Method Summary
Modifier and TypeMethodDescriptionabstract List<MetaMethod>Returns the list of metamethods provided by this extension module.getName()Returns the name of this extension module.Returns the version of this extension module.toString()Returns a string representation of this extension module.
-
Constructor Details
-
ExtensionModule
Constructs a new ExtensionModule with the specified name and version.- Parameters:
moduleName- the name of this extension modulemoduleVersion- the version of this extension module
-
-
Method Details
-
getName
Returns the name of this extension module.- Returns:
- the module name
-
getVersion
Returns the version of this extension module.- Returns:
- the module version
-
getMetaMethods
Returns the list of metamethods provided by this extension module. These methods are added to existing Groovy classes to extend their functionality.- Returns:
- a list of metamethods provided by this module
-
toString
Returns a string representation of this extension module.
-