Class SpringFactoryImportSelector<T>
java.lang.Object
org.springframework.cloud.commons.util.SpringFactoryImportSelector<T>
- Type Parameters:
T- type of annotation class
- All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.annotation.DeferredImportSelector, org.springframework.context.annotation.ImportSelector, org.springframework.context.EnvironmentAware
- Direct Known Subclasses:
EnableDiscoveryClientImportSelector
public abstract class SpringFactoryImportSelector<T>
extends Object
implements org.springframework.context.annotation.DeferredImportSelector, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.EnvironmentAware
Selects configurations to load, defined by the generic type T. Loads implementations
using
SpringFactoriesLoader.- Author:
- Spencer Gibb, Dave Syer
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.context.annotation.DeferredImportSelector
org.springframework.context.annotation.DeferredImportSelector.Group -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.core.env.Environmentprotected Stringprotected booleanprotected abstract booleanString[]selectImports(org.springframework.core.type.AnnotationMetadata metadata) voidsetBeanClassLoader(ClassLoader classLoader) voidsetEnvironment(org.springframework.core.env.Environment environment) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.annotation.DeferredImportSelector
getImportGroupMethods inherited from interface org.springframework.context.annotation.ImportSelector
getExclusionFilter
-
Constructor Details
-
SpringFactoryImportSelector
protected SpringFactoryImportSelector()
-
-
Method Details
-
selectImports
- Specified by:
selectImportsin interfaceorg.springframework.context.annotation.ImportSelector
-
hasDefaultFactory
protected boolean hasDefaultFactory() -
isEnabled
protected abstract boolean isEnabled() -
getSimpleName
-
getAnnotationClass
-
getEnvironment
protected org.springframework.core.env.Environment getEnvironment() -
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment) - Specified by:
setEnvironmentin interfaceorg.springframework.context.EnvironmentAware
-
setBeanClassLoader
- Specified by:
setBeanClassLoaderin interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-