+ /**
+ * Add an additional new module
+ *
+ * @param module
+ * The new module
+ */
+ public void addAnalysisModule(IAnalysisModule module) {
+ fAdditionalModules.add(module);
+ }
+
+ @Override
+ public Iterable<@NonNull IAnalysisModule> getAnalysisModules() {
+ @NonNull Iterable<IAnalysisModule> modules = super.getAnalysisModules();
+ return checkNotNull(Iterables.concat(modules, fAdditionalModules));
+ }
+
+ @Override
+ public @Nullable IAnalysisModule getAnalysisModule(@Nullable String analysisId) {
+ Iterable<@NonNull IAnalysisModule> modules = getAnalysisModules();
+ Optional<IAnalysisModule> opt = StreamSupport.stream(modules.spliterator(), false).filter(analysis -> analysis.getId().equals(analysisId)).findFirst();
+ return opt.isPresent() ? opt.get() : null;
+ }