spring-boot-starter-data-jest/src/main/java/com/github/vanroy/springboot/autoconfigure/data/jest/ElasticsearchJestAutoConfiguration.java
@SuppressWarnings("unchecked")
	private static Collection<Class<? extends Plugin>> scanPlugins() {
		ClassPathScanningCandidateComponentProvider componentProvider = new ClassPathScanningCandidateComponentProvider(false);
		componentProvider.addIncludeFilter(new AssignableTypeFilter(Plugin.class));

		return componentProvider.findCandidateComponents("org.elasticsearch.plugin").stream()
				.map(BeanDefinition::getBeanClassName)
				.map(name -> {
					try {
						return (Class<? extends Plugin>) Class.forName(name);
					} catch (ClassNotFoundException e) {
						logger.warn("Cannot load class on plugin detection", e);
						return null;
					}
				})
				.collect(Collectors.toSet());
	}
@SuppressWarnings("unchecked")
	private static Collection<Class<? extends Plugin>> scanPlugins() {
		ClassPathScanningCandidateComponentProvider componentProvider = new ClassPathScanningCandidateComponentProvider(false);
		componentProvider.addIncludeFilter(new AssignableTypeFilter(Plugin.class));

		return componentProvider.findCandidateComponents("org.elasticsearch.plugin").stream()
				.map(BeanDefinition::getBeanClassName)
				.map(name -> {
					try {
						return (Class<? extends Plugin>) Class.forName(name);
					} catch (ClassNotFoundException e) {
						logger.warn("Cannot load class on plugin detection", e);
						return null;
					}
				})
				.collect(Collectors.toSet());
	}
@ SuppressWarnings ( "unchecked" ) private static Collection < Class < ? extends Plugin > > scanPlugins ( ) { ClassPathScanningCandidateComponentProvider componentProvider = new ClassPathScanningCandidateComponentProvider ( false ) ; componentProvider . addIncludeFilter ( new AssignableTypeFilter ( Plugin . class ) ) ; return componentProvider . findCandidateComponents ( "org.elasticsearch.plugin" ) . stream ( ) . map ( BeanDefinition :: getBeanClassName ) . map ( name -> { try { return ( Class < ? extends Plugin > ) Class . forName ( name ) ; } catch ( ClassNotFoundException e ) { logger . warn ( "Cannot load class on plugin detection" , e ) ; return null ; } } ) . collect ( Collectors . toSet ( ) ) ; }
List all official ES plugins available on ClassPath.
@return List of plugins class
List all official ES plugins available on ClassPath .