public class ContextConfigurationAttributes extends Object
ContextConfigurationAttributes encapsulates the context configuration
 attributes declared via @ContextConfiguration.ContextConfiguration, 
SmartContextLoader.processContextConfiguration(ContextConfigurationAttributes), 
MergedContextConfiguration| Constructor and Description | 
|---|
| ContextConfigurationAttributes(Class<?> declaringClass)Construct a new  ContextConfigurationAttributesinstance with default values. | 
| ContextConfigurationAttributes(Class<?> declaringClass,
                              AnnotationAttributes annAttrs)Construct a new  ContextConfigurationAttributesinstance for the
 suppliedAnnotationAttributes(parsed from a@ContextConfigurationannotation) and
 the test class that declared them. | 
| ContextConfigurationAttributes(Class<?> declaringClass,
                              ContextConfiguration contextConfiguration)Construct a new  ContextConfigurationAttributesinstance for the
 supplied@ContextConfigurationannotation and
 the test class that declared it. | 
| ContextConfigurationAttributes(Class<?> declaringClass,
                              String[] locations,
                              Class<?>[] classes,
                              boolean inheritLocations,
                              Class<? extends ApplicationContextInitializer<?>>[] initializers,
                              boolean inheritInitializers,
                              Class<? extends ContextLoader> contextLoaderClass)Construct a new  ContextConfigurationAttributesinstance for the
 test class that declared the@ContextConfigurationannotation and its
 corresponding attributes. | 
| ContextConfigurationAttributes(Class<?> declaringClass,
                              String[] locations,
                              Class<?>[] classes,
                              boolean inheritLocations,
                              Class<? extends ApplicationContextInitializer<?>>[] initializers,
                              boolean inheritInitializers,
                              String name,
                              Class<? extends ContextLoader> contextLoaderClass)Construct a new  ContextConfigurationAttributesinstance for the
 test class that declared the@ContextConfigurationannotation and its
 corresponding attributes. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object other)Determine if the supplied object is equal to this
  ContextConfigurationAttributesinstance by comparing both object's
 declaring class,
 locations,
 annotated classes,
 inheritLocations flag,
 context initializer classes,
 inheritInitializers flag, and theContextLoader class. | 
| Class<?>[] | getClasses()Get the annotated classes that were declared via
  @ContextConfiguration. | 
| Class<? extends ContextLoader> | getContextLoaderClass()Get the  ContextLoaderclass that was declared via@ContextConfiguration. | 
| Class<?> | getDeclaringClass()Get the class that declared the
  @ContextConfigurationannotation, either explicitly
 or implicitly. | 
| Class<? extends ApplicationContextInitializer<?>>[] | getInitializers()Get the  ApplicationContextInitializerclasses that were declared via@ContextConfiguration. | 
| String[] | getLocations()Get the resource locations that were declared via
  @ContextConfiguration. | 
| String | getName()Get the name of the context hierarchy level that was declared via
  @ContextConfiguration. | 
| boolean | hasClasses()Determine if this  ContextConfigurationAttributesinstance has
 class-based resources. | 
| int | hashCode()Generate a unique hash code for all properties of this
  ContextConfigurationAttributesinstance excluding the
 name. | 
| boolean | hasLocations()Determine if this  ContextConfigurationAttributesinstance has
 path-based resource locations. | 
| boolean | hasResources()Determine if this  ContextConfigurationAttributesinstance has
 either path-based resource locations or class-based resources. | 
| boolean | isInheritInitializers()Get the  inheritInitializersflag that was declared via@ContextConfiguration. | 
| boolean | isInheritLocations()Get the  inheritLocationsflag that was declared via@ContextConfiguration. | 
| void | setClasses(Class<?>... classes)Set the processed annotated classes, effectively overriding the
 original value declared via  @ContextConfiguration. | 
| void | setLocations(String... locations)Set the processed resource locations, effectively overriding the
 original value declared via  @ContextConfiguration. | 
| String | toString()Provide a String representation of the context configuration attributes
 and declaring class. | 
public ContextConfigurationAttributes(Class<?> declaringClass)
ContextConfigurationAttributes instance with default values.declaringClass - the test class that declared @ContextConfiguration,
 either explicitly or implicitlypublic ContextConfigurationAttributes(Class<?> declaringClass, ContextConfiguration contextConfiguration)
ContextConfigurationAttributes instance for the
 supplied @ContextConfiguration annotation and
 the test class that declared it.declaringClass - the test class that declared @ContextConfigurationcontextConfiguration - the annotation from which to retrieve the attributespublic ContextConfigurationAttributes(Class<?> declaringClass, AnnotationAttributes annAttrs)
ContextConfigurationAttributes instance for the
 supplied AnnotationAttributes (parsed from a
 @ContextConfiguration annotation) and
 the test class that declared them.declaringClass - the test class that declared @ContextConfigurationannAttrs - the annotation attributes from which to retrieve the attributespublic ContextConfigurationAttributes(Class<?> declaringClass, String[] locations, Class<?>[] classes, boolean inheritLocations, Class<? extends ApplicationContextInitializer<?>>[] initializers, boolean inheritInitializers, Class<? extends ContextLoader> contextLoaderClass)
ContextConfigurationAttributes instance for the
 test class that declared the
 @ContextConfiguration annotation and its
 corresponding attributes.declaringClass - the test class that declared @ContextConfigurationlocations - the resource locations declared via @ContextConfigurationclasses - the annotated classes declared via @ContextConfigurationinheritLocations - the inheritLocations flag declared via @ContextConfigurationinitializers - the context initializers declared via @ContextConfigurationinheritInitializers - the inheritInitializers flag declared via @ContextConfigurationcontextLoaderClass - the ContextLoader class declared via @ContextConfigurationIllegalArgumentException - if the declaringClass or contextLoaderClass is
 nullpublic ContextConfigurationAttributes(Class<?> declaringClass, String[] locations, Class<?>[] classes, boolean inheritLocations, Class<? extends ApplicationContextInitializer<?>>[] initializers, boolean inheritInitializers, @Nullable String name, Class<? extends ContextLoader> contextLoaderClass)
ContextConfigurationAttributes instance for the
 test class that declared the
 @ContextConfiguration annotation and its
 corresponding attributes.declaringClass - the test class that declared @ContextConfigurationlocations - the resource locations declared via @ContextConfigurationclasses - the annotated classes declared via @ContextConfigurationinheritLocations - the inheritLocations flag declared via @ContextConfigurationinitializers - the context initializers declared via @ContextConfigurationinheritInitializers - the inheritInitializers flag declared via @ContextConfigurationname - the name of level in the context hierarchy, or null if not applicablecontextLoaderClass - the ContextLoader class declared via @ContextConfigurationIllegalArgumentException - if the declaringClass or contextLoaderClass is
 nullpublic Class<?> getDeclaringClass()
@ContextConfiguration annotation, either explicitly
 or implicitly.null)public void setClasses(Class<?>... classes)
@ContextConfiguration.getClasses()public Class<?>[] getClasses()
@ContextConfiguration.
 Note: this is a mutable property. The returned value may therefore
 represent a processed value that does not match the original value
 declared via @ContextConfiguration.
ContextConfiguration.classes(), 
setClasses(Class[])public boolean hasClasses()
ContextConfigurationAttributes instance has
 class-based resources.true if the classes array is not emptyhasResources(), 
hasLocations()public void setLocations(String... locations)
@ContextConfiguration.getLocations()public String[] getLocations()
@ContextConfiguration.
 Note: this is a mutable property. The returned value may therefore
 represent a processed value that does not match the original value
 declared via @ContextConfiguration.
ContextConfiguration.value(), 
ContextConfiguration.locations(), 
setLocations(java.lang.String...)public boolean hasLocations()
ContextConfigurationAttributes instance has
 path-based resource locations.true if the locations array is not emptyhasResources(), 
hasClasses()public boolean hasResources()
ContextConfigurationAttributes instance has
 either path-based resource locations or class-based resources.true if either the locations
 or the classes array is not emptyhasLocations(), 
hasClasses()public boolean isInheritLocations()
inheritLocations flag that was declared via
 @ContextConfiguration.inheritLocations flagContextConfiguration.inheritLocations()public Class<? extends ApplicationContextInitializer<?>>[] getInitializers()
ApplicationContextInitializer classes that were declared via
 @ContextConfiguration.ApplicationContextInitializer classespublic boolean isInheritInitializers()
inheritInitializers flag that was declared via
 @ContextConfiguration.inheritInitializers flag@Nullable public String getName()
@ContextConfiguration.null if not applicableContextConfiguration.name()public Class<? extends ContextLoader> getContextLoaderClass()
ContextLoader class that was declared via
 @ContextConfiguration.ContextLoader classContextConfiguration.loader()public boolean equals(@Nullable Object other)
ContextConfigurationAttributes instance by comparing both object's
 declaring class,
 locations,
 annotated classes,
 inheritLocations flag,
 context initializer classes,
 inheritInitializers flag, and the
 ContextLoader class.public int hashCode()
ContextConfigurationAttributes instance excluding the
 name.