|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader
class ConfigurationClassBeanDefinitionReader
Reads a given fully-populated configuration model, registering bean definitions
with the given BeanDefinitionRegistry
based on its contents.
This class was modeled after the BeanDefinitionReader
hierarchy, but does
not implement/extend any of its artifacts as a configuration model is not a Resource
.
ConfigurationClassParser
Nested Class Summary | |
---|---|
private static class |
ConfigurationClassBeanDefinitionReader.ConfigurationClassBeanDefinition
RootBeanDefinition marker subclass used to signify that a bean definition
created from a configuration class as opposed to any other configuration source. |
private static class |
ConfigurationClassBeanDefinitionReader.InvalidConfigurationImportProblem
Configuration classes must be annotated with @Configuration or
declare at least one @Bean method. |
Field Summary | |
---|---|
private static java.lang.String |
CONFIGURATION_CLASS_ATTRIBUTE
|
private static java.lang.String |
CONFIGURATION_CLASS_FULL
|
private static java.lang.String |
CONFIGURATION_CLASS_LITE
|
private static Log |
logger
|
private MetadataReaderFactory |
metadataReaderFactory
|
private ProblemReporter |
problemReporter
|
private BeanDefinitionRegistry |
registry
|
private SourceExtractor |
sourceExtractor
|
Constructor Summary | |
---|---|
ConfigurationClassBeanDefinitionReader(BeanDefinitionRegistry registry,
SourceExtractor sourceExtractor,
ProblemReporter problemReporter,
MetadataReaderFactory metadataReaderFactory)
Create a new ConfigurationClassBeanDefinitionReader instance that will be used
to populate the given BeanDefinitionRegistry . |
Method Summary | |
---|---|
static boolean |
checkConfigurationClassCandidate(BeanDefinition beanDef,
MetadataReaderFactory metadataReaderFactory)
Check whether the given bean definition is a candidate for a configuration class, and mark it accordingly. |
private void |
doLoadBeanDefinitionForConfigurationClassIfNecessary(ConfigurationClass configClass)
Registers the Configuration class itself as a bean definition. |
static boolean |
isFullConfigurationClass(BeanDefinition beanDef)
Determine whether the given bean definition indicates a full @Configuration class. |
void |
loadBeanDefinitions(java.util.Set<ConfigurationClass> configurationModel)
Reads configurationModel , registering bean definitions with registry
based on its contents. |
private void |
loadBeanDefinitionsForConfigurationClass(ConfigurationClass configClass)
Reads a particular ConfigurationClass , registering bean definitions for the
class itself, all its Bean methods |
private void |
loadBeanDefinitionsForModelMethod(ConfigurationClassMethod method)
Reads a particular ConfigurationClassMethod , registering bean definitions
with the BeanDefinitionRegistry based on its contents. |
private void |
loadBeanDefinitionsFromImportedResources(java.util.Map<java.lang.String,java.lang.Class<?>> importedResources)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String CONFIGURATION_CLASS_FULL
private static final java.lang.String CONFIGURATION_CLASS_LITE
private static final java.lang.String CONFIGURATION_CLASS_ATTRIBUTE
private static final Log logger
private final BeanDefinitionRegistry registry
private final SourceExtractor sourceExtractor
private final ProblemReporter problemReporter
private final MetadataReaderFactory metadataReaderFactory
Constructor Detail |
---|
public ConfigurationClassBeanDefinitionReader(BeanDefinitionRegistry registry, SourceExtractor sourceExtractor, ProblemReporter problemReporter, MetadataReaderFactory metadataReaderFactory)
ConfigurationClassBeanDefinitionReader
instance that will be used
to populate the given BeanDefinitionRegistry
.
problemReporter
- metadataReaderFactory
- Method Detail |
---|
public void loadBeanDefinitions(java.util.Set<ConfigurationClass> configurationModel)
configurationModel
, registering bean definitions with registry
based on its contents.
private void loadBeanDefinitionsForConfigurationClass(ConfigurationClass configClass)
ConfigurationClass
, registering bean definitions for the
class itself, all its Bean
methods
private void doLoadBeanDefinitionForConfigurationClassIfNecessary(ConfigurationClass configClass)
Configuration
class itself as a bean definition.
private void loadBeanDefinitionsForModelMethod(ConfigurationClassMethod method)
ConfigurationClassMethod
, registering bean definitions
with the BeanDefinitionRegistry based on its contents.
private void loadBeanDefinitionsFromImportedResources(java.util.Map<java.lang.String,java.lang.Class<?>> importedResources)
public static boolean checkConfigurationClassCandidate(BeanDefinition beanDef, MetadataReaderFactory metadataReaderFactory)
beanDef
- the bean definition to checkmetadataReaderFactory
- the current factory in use by the caller
public static boolean isFullConfigurationClass(BeanDefinition beanDef)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |