public abstract class Configurations extends 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(Collection<Class<?>> classes) |
| Modifier and Type | Method and Description |
|---|---|
protected Set<Class<?>> |
getClasses() |
static Class<?>[] |
getClasses(Collection<Configurations> configurations)
Return the classes from all the specified configurations in the order that they
would be registered.
|
static 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(Set<Class<?>> mergedClasses)
Merge configurations.
|
protected Collection<Class<?>> |
sort(Collection<Class<?>> classes)
Sort configuration classes into the order that they should be applied.
|
protected Configurations(Collection<Class<?>> classes)
protected Collection<Class<?>> sort(Collection<Class<?>> classes)
classes - the classes to sortprotected Configurations merge(Configurations other)
other - the other Configurations (must be of the same type as this
instance)protected abstract Configurations merge(Set<Class<?>> mergedClasses)
mergedClasses - the merged classespublic static Class<?>[] getClasses(Configurations... configurations)
configurations - the source configurationpublic static Class<?>[] getClasses(Collection<Configurations> configurations)
configurations - the source configurationCopyright © 2019 Pivotal Software, Inc.. All rights reserved.