io.vertx.groovy.ext.mongo.VertxPropertiesModuleFactory Maven / Gradle / Ivy
package io.vertx.groovy.ext.mongo;
import groovy.lang.MetaMethod;
import org.codehaus.groovy.runtime.m12n.ExtensionModule;
import org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule;
import org.codehaus.groovy.runtime.m12n.PropertiesModuleFactory;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
public class VertxPropertiesModuleFactory extends PropertiesModuleFactory {
@Override
public ExtensionModule newModule(Properties properties, ClassLoader classLoader) {
try {
classLoader.loadClass("io.vertx.lang.groovy.GroovyVerticleFactory");
return MetaInfExtensionModule.newModule(properties, classLoader);
} catch (Throwable t) {
String moduleName = properties.getProperty("moduleName");
String moduleVersion = properties.getProperty("moduleVersion");
return new ExtensionModule(moduleName, moduleVersion) {
@Override
public List getMetaMethods() {
return Collections.emptyList();
}
};
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy