I have added an interface 'FileGenerator' as an extension point and implementation class 'JavaFileGenerator' is added implementing to the interface/extension point however the implementation class is not getting executed. I have below classes in my sonar plugin
- MyPlugin class implementing Plugin interface where I have registered my extension class 'JavaFileGenerator'
- FileGenerator is annotated with @ExtensionPoint, @BatchSide/@ServerSide
In JavaFileGenerator class FileSystem is injected in constructor of the class
public class MyPlugin implements Plugin { @Override public void define(Context context) { context.addExtension(JavaFileGenerator.class); } } @BatchSide @ExtensionPoint public interface FileGenerator { void generateFile(); } public class JavaFileGenerator implements FileGenerator{ private FileSystem fileSystem; public JavaFileGenerator(final FileSystem fileSystem){ this.fileSystem=fileSystem; } @Override public void generateFile() { ... } }
JavaFileGenerator class does not get executed. Anybody has any idea about this?