Package org.codehaus.groovy.runtime.m12n

# Class ExtensionModule

java.lang.Object
org.codehaus.groovy.runtime.m12n.ExtensionModule

Direct Known Subclasses:
  `SimpleExtensionModule`

public abstract class ExtensionModule extends Object
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

  Constructors
  Constructor
  Description
  `ExtensionModule(String moduleName, String moduleVersion)`
  Constructs a new ExtensionModule with the specified name and version.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract List<MetaMethod>`
  `getMetaMethods()`
  Returns the list of metamethods provided by this extension module.
  `String`
  `getName()`
  Returns the name of this extension module.
  `String`
  `getVersion()`
  Returns the version of this extension module.
  `String`
  `toString()`
  Returns a string representation of this extension module.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ExtensionModule

    public ExtensionModule(String moduleName, String moduleVersion)
    Constructs a new ExtensionModule with the specified name and version.
    Parameters:
      `moduleName` - the name of this extension module
      `moduleVersion` - the version of this extension module

- ## Method Details

  - ### getName

    public String getName()
    Returns the name of this extension module.
    Returns:
      the module name

  - ### getVersion

    public String getVersion()
    Returns the version of this extension module.
    Returns:
      the module version

  - ### getMetaMethods

    public abstract List<MetaMethod> 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

    public String toString()
    Returns a string representation of this extension module.
    Overrides:
      `toString` in class `Object`
    Returns:
      a string representation including the module name and version