final class ConfigurationClass
extends java.lang.Object
@Configuration
class.
Includes a set of Bean
methods, including all such methods defined in the
ancestry of the class, in a 'flattened-out' manner.BeanMethod
,
ConfigurationClassParser
Modifier and Type | Class and Description |
---|---|
private class |
ConfigurationClass.BeanMethodOverloadingProblem
Bean methods on configuration classes may only be overloaded through inheritance.
|
private class |
ConfigurationClass.FinalConfigurationProblem
Configuration classes must be non-final to accommodate CGLIB subclassing.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Set<BeanMethod> |
beanMethods |
private java.lang.String |
beanName |
private boolean |
imported |
private java.util.Map<java.lang.String,java.lang.Class<? extends BeanDefinitionReader>> |
importedResources |
private AnnotationMetadata |
metadata |
private Resource |
resource |
Constructor and Description |
---|
ConfigurationClass(java.lang.Class<?> clazz,
boolean imported)
Create a new
ConfigurationClass representing a class that was imported
using the Import annotation or automatically processed as a nested
configuration class (if imported is true ). |
ConfigurationClass(java.lang.Class<?> clazz,
java.lang.String beanName)
Create a new
ConfigurationClass with the given name. |
ConfigurationClass(MetadataReader metadataReader,
boolean imported)
Create a new
ConfigurationClass representing a class that was imported
using the Import annotation or automatically processed as a nested
configuration class (if imported is true ). |
ConfigurationClass(MetadataReader metadataReader,
java.lang.String beanName)
Create a new
ConfigurationClass with the given name. |
Modifier and Type | Method and Description |
---|---|
void |
addBeanMethod(BeanMethod method) |
void |
addImportedResource(java.lang.String importedResource,
java.lang.Class<? extends BeanDefinitionReader> readerClass) |
boolean |
equals(java.lang.Object other) |
java.util.Set<BeanMethod> |
getBeanMethods() |
java.lang.String |
getBeanName() |
java.util.Map<java.lang.String,java.lang.Class<? extends BeanDefinitionReader>> |
getImportedResources() |
AnnotationMetadata |
getMetadata() |
Resource |
getResource() |
java.lang.String |
getSimpleName() |
int |
hashCode() |
boolean |
isImported()
Return whether this configuration class was registered via @
Import or
automatically registered due to being nested within another configuration class. |
void |
setBeanName(java.lang.String beanName) |
java.lang.String |
toString() |
void |
validate(ProblemReporter problemReporter) |
private final AnnotationMetadata metadata
private final Resource resource
private final java.util.Map<java.lang.String,java.lang.Class<? extends BeanDefinitionReader>> importedResources
private final java.util.Set<BeanMethod> beanMethods
private java.lang.String beanName
private final boolean imported
public ConfigurationClass(MetadataReader metadataReader, java.lang.String beanName)
ConfigurationClass
with the given name.metadataReader
- reader used to parse the underlying Class
beanName
- must not be null
java.lang.IllegalArgumentException
- if beanName is null (as of Spring 3.1.1)ConfigurationClass(Class, boolean)
public ConfigurationClass(MetadataReader metadataReader, boolean imported)
ConfigurationClass
representing a class that was imported
using the Import
annotation or automatically processed as a nested
configuration class (if imported is true
).metadataReader
- reader used to parse the underlying Class
beanName
- name of the @Configuration
class beanpublic ConfigurationClass(java.lang.Class<?> clazz, java.lang.String beanName)
ConfigurationClass
with the given name.clazz
- the underlying Class
to representbeanName
- name of the @Configuration
class beanjava.lang.IllegalArgumentException
- if beanName is null (as of Spring 3.1.1)ConfigurationClass(Class, boolean)
public ConfigurationClass(java.lang.Class<?> clazz, boolean imported)
ConfigurationClass
representing a class that was imported
using the Import
annotation or automatically processed as a nested
configuration class (if imported is true
).clazz
- the underlying Class
to representbeanName
- name of the @Configuration
class beanpublic AnnotationMetadata getMetadata()
public Resource getResource()
public java.lang.String getSimpleName()
public boolean isImported()
Import
or
automatically registered due to being nested within another configuration class.public void setBeanName(java.lang.String beanName)
public java.lang.String getBeanName()
public void addBeanMethod(BeanMethod method)
public java.util.Set<BeanMethod> getBeanMethods()
public void addImportedResource(java.lang.String importedResource, java.lang.Class<? extends BeanDefinitionReader> readerClass)
public java.util.Map<java.lang.String,java.lang.Class<? extends BeanDefinitionReader>> getImportedResources()
public void validate(ProblemReporter problemReporter)
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object