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
A
SimpleExtensionModule implementation which reads extension class
metadata from META-INF.- Since:
- 2.0.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of classes that define new instance methods for this module.Returns the list of classes that define new static methods for this module.static MetaInfExtensionModulenewModule(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
getMetaMethodsMethods inherited from class org.codehaus.groovy.runtime.m12n.ExtensionModule
getName, getVersion, toString
-
Field Details
-
MODULE_INSTANCE_CLASSES_KEY
Property key in META-INF configuration file for specifying instance method extension classes.- See Also:
-
MODULE_STATIC_CLASSES_KEY
Property key in META-INF configuration file for specifying static method extension classes.- See Also:
-
-
Method Details
-
getInstanceMethodsExtensionClasses
Returns the list of classes that define new instance methods for this module.- Specified by:
getInstanceMethodsExtensionClassesin classSimpleExtensionModule- Returns:
- the list of instance method extension classes
-
getStaticMethodsExtensionClasses
Returns the list of classes that define new static methods for this module.- Specified by:
getStaticMethodsExtensionClassesin classSimpleExtensionModule- Returns:
- the list of static method extension classes
-
newModule
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 propertiesloader- 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
-