org.springframework.context.annotation
Class ConfigurationClass

java.lang.Object
  extended by org.springframework.context.annotation.ConfigurationClass

final class ConfigurationClass
extends java.lang.Object

Represents a user-defined @Configuration class. Includes a set of Bean methods, including all such methods defined in the ancestry of the class, in a 'flattened-out' manner.

Since:
3.0
Author:
Chris Beams, Juergen Hoeller
See Also:
ConfigurationClassMethod, ConfigurationClassParser

Nested Class Summary
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.
 
Field Summary
private  java.lang.String beanName
           
private  java.util.Map<java.lang.String,java.lang.Class<?>> importedResources
           
private  AnnotationMetadata metadata
           
private  java.util.Set<ConfigurationClassMethod> methods
           
private  Resource resource
           
 
Constructor Summary
ConfigurationClass(java.lang.Class<?> clazz, java.lang.String beanName)
           
ConfigurationClass(MetadataReader metadataReader, java.lang.String beanName)
           
 
Method Summary
 void addImportedResource(java.lang.String importedResource, java.lang.Class<?> readerClass)
           
 void addMethod(ConfigurationClassMethod method)
           
 boolean equals(java.lang.Object other)
           
 java.lang.String getBeanName()
           
 java.util.Map<java.lang.String,java.lang.Class<?>> getImportedResources()
           
 AnnotationMetadata getMetadata()
           
 java.util.Set<ConfigurationClassMethod> getMethods()
           
 Resource getResource()
           
 java.lang.String getSimpleName()
           
 int hashCode()
           
 void setBeanName(java.lang.String beanName)
           
 void validate(ProblemReporter problemReporter)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metadata

private final AnnotationMetadata metadata

resource

private final Resource resource

importedResources

private final java.util.Map<java.lang.String,java.lang.Class<?>> importedResources

methods

private final java.util.Set<ConfigurationClassMethod> methods

beanName

private java.lang.String beanName
Constructor Detail

ConfigurationClass

public ConfigurationClass(MetadataReader metadataReader,
                          java.lang.String beanName)

ConfigurationClass

public ConfigurationClass(java.lang.Class<?> clazz,
                          java.lang.String beanName)
Method Detail

getMetadata

public AnnotationMetadata getMetadata()

getResource

public Resource getResource()

getSimpleName

public java.lang.String getSimpleName()

setBeanName

public void setBeanName(java.lang.String beanName)

getBeanName

public java.lang.String getBeanName()

addMethod

public void addMethod(ConfigurationClassMethod method)

getMethods

public java.util.Set<ConfigurationClassMethod> getMethods()

addImportedResource

public void addImportedResource(java.lang.String importedResource,
                                java.lang.Class<?> readerClass)

getImportedResources

public java.util.Map<java.lang.String,java.lang.Class<?>> getImportedResources()

validate

public void validate(ProblemReporter problemReporter)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object