public abstract class Configurations
extends java.lang.Object
@Configuration classes that can be registered in
ApplicationContext. Classes can be returned from one or more
Configurations instances by using getClasses(Configurations[]). The
resulting array follows the ordering rules usually applied by the
ApplicationContext and/or custom ImportSelector implementations.
This class is primarily intended for use with tests that need to specify configuration
classes but can't use SpringRunner.
Implementations of this class should be annotated with @Order or implement
Ordered.
UserConfigurations| Modifier | Constructor and Description |
|---|---|
protected |
Configurations(java.util.Collection<java.lang.Class<?>> classes) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Set<java.lang.Class<?>> |
getClasses() |
static java.lang.Class<?>[] |
getClasses(java.util.Collection<Configurations> configurations)
Return the classes from all the specified configurations in the order that they
would be registered.
|
static java.lang.Class<?>[] |
getClasses(Configurations... configurations)
Return the classes from all the specified configurations in the order that they
would be registered.
|
protected Configurations |
merge(Configurations other)
Merge configurations from another source of the same type.
|
protected abstract Configurations |
merge(java.util.Set<java.lang.Class<?>> mergedClasses)
Merge configurations.
|
protected java.util.Collection<java.lang.Class<?>> |
sort(java.util.Collection<java.lang.Class<?>> classes)
Sort configuration classes into the order that they should be applied.
|
protected Configurations(java.util.Collection<java.lang.Class<?>> classes)
protected java.util.Collection<java.lang.Class<?>> sort(java.util.Collection<java.lang.Class<?>> classes)
classes - the classes to sortprotected final java.util.Set<java.lang.Class<?>> getClasses()
protected Configurations merge(Configurations other)
other - the other Configurations (must be of the same type as this
instance)protected abstract Configurations merge(java.util.Set<java.lang.Class<?>> mergedClasses)
mergedClasses - the merged classespublic static java.lang.Class<?>[] getClasses(Configurations... configurations)
configurations - the source configurationpublic static java.lang.Class<?>[] getClasses(java.util.Collection<Configurations> configurations)
configurations - the source configuration