Package org.codehaus.groovy.runtime.m12n

# Class MetaInfExtensionModule

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

public class MetaInfExtensionModule extends SimpleExtensionModule
A `SimpleExtensionModule` implementation which reads extension class metadata from META-INF.

Since:
  2.0.0

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `MODULE_INSTANCE_CLASSES_KEY`
  Property key in META-INF configuration file for specifying instance method extension classes.
  `static final String`
  `MODULE_STATIC_CLASSES_KEY`
  Property key in META-INF configuration file for specifying static method extension classes.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<Class>`
  `getInstanceMethodsExtensionClasses()`
  Returns the list of classes that define new instance methods for this module.
  `List<Class>`
  `getStaticMethodsExtensionClasses()`
  Returns the list of classes that define new static methods for this module.
  `static MetaInfExtensionModule`
  `newModule(Properties properties, ClassLoader loader)`
  Creates a new MetaInfExtensionModule from the given properties and class loader.

  ### Methods inherited from class org.codehaus.groovy.runtime.m12n.SimpleExtensionModule

  `getMetaMethods`

  ### Methods inherited from class org.codehaus.groovy.runtime.m12n.ExtensionModule

  `getName, getVersion, toString`

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

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

- ## Field Details

  - ### MODULE_INSTANCE_CLASSES_KEY

    public static final String MODULE_INSTANCE_CLASSES_KEY
    Property key in META-INF configuration file for specifying instance method extension classes.
    See Also:
      - Constant Field Values

  - ### MODULE_STATIC_CLASSES_KEY

    public static final String MODULE_STATIC_CLASSES_KEY
    Property key in META-INF configuration file for specifying static method extension classes.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getInstanceMethodsExtensionClasses

    public List<Class> getInstanceMethodsExtensionClasses()
    Returns the list of classes that define new instance methods for this module.
    Specified by:
      `getInstanceMethodsExtensionClasses` in class `SimpleExtensionModule`
    Returns:
      the list of instance method extension classes

  - ### getStaticMethodsExtensionClasses

    public List<Class> getStaticMethodsExtensionClasses()
    Returns the list of classes that define new static methods for this module.
    Specified by:
      `getStaticMethodsExtensionClasses` in class `SimpleExtensionModule`
    Returns:
      the list of static method extension classes

  - ### newModule

    public static MetaInfExtensionModule newModule(Properties properties, ClassLoader loader)
    Creates a new MetaInfExtensionModule from the given properties and class loader. The properties should contain the module name and version, as well as class names for instance and static extension methods.
    Parameters:
      `properties` - the module metadata properties
      `loader` - the class loader to use for loading extension classes
    Returns:
      a new MetaInfExtensionModule configured with the properties
    Throws:
      `GroovyRuntimeException` - if required properties (name or version) are missing