Provide a module service if you need to can be used to store data associated with a module. Its implementation should be registered in plugin.xml:
<extensions defaultExtensionNs="com.intellij">
<moduleService serviceInterface="qualified-interface-class-name"
serviceImplementation="qualified-implementation-class-name"/>
</extensions>
Class is loaded and its instance is created lazily when
getService(Module, Class)
method is called for the first time.
If the service implementation class implements
PersistentStateComponent
interface its state will
be persisted in the module configuration file.