com.servicerocket.confluence.plugin.utility.library.InjectionAdaptorModuleDescriptor Maven / Gradle / Ivy
The newest version!
package com.servicerocket.confluence.plugin.utility.library;
import com.atlassian.plugin.Plugin;
import com.atlassian.plugin.descriptors.AbstractModuleDescriptor;
import com.atlassian.plugin.module.ModuleFactory;
import com.servicerocket.confluence.randombits.supplier.core.param.Adaptor;
import org.dom4j.Element;
/**
*
*/
public class InjectionAdaptorModuleDescriptor extends AbstractModuleDescriptor> {
private Adaptor> adaptor;
public InjectionAdaptorModuleDescriptor(ModuleFactory moduleFactory) {
super(moduleFactory);
}
@Override
public void init(@NotNull final Plugin plugin, @NotNull Element element) {
super.init(plugin, element);
adaptor = null;
}
@Override
public Adaptor> getModule() {
if (adaptor == null)
adaptor = moduleFactory.createModule(moduleClassName, this);
return adaptor;
}
}