Optional<String> moduleName = ModuleUtils.getModuleName(getClass()); if (moduleName.isPresent()) { return moduleName;
Optional<String> moduleVersion = ModuleUtils.getModuleVersion(getClass()); if (moduleVersion.isPresent()) { return moduleVersion;
private List<? extends DiscoverySelector> createDiscoverySelectors(CommandLineOptions options) { if (options.isScanClasspath()) { Preconditions.condition(!options.hasExplicitSelectors(), "Scanning the classpath and using explicit selectors at the same time is not supported"); return createClasspathRootSelectors(options); } if (options.isScanModulepath()) { Preconditions.condition(!options.hasExplicitSelectors(), "Scanning the module-path and using explicit selectors at the same time is not supported"); return selectModules(ModuleUtils.findAllNonSystemBootModuleNames()); } return createExplicitDiscoverySelectors(options); }