Class MetaInfExtensionModule


public class MetaInfExtensionModule extends SimpleExtensionModule
A SimpleExtensionModule implementation which reads extension class metadata from META-INF.
Since:
2.0.0
  • 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:
    • 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:
  • 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