Package org.springframework.test.context
Enum Class TestConstructor.AutowireMode
java.lang.Object
java.lang.Enum<TestConstructor.AutowireMode>
org.springframework.test.context.TestConstructor.AutowireMode
- All Implemented Interfaces:
Serializable
,Comparable<TestConstructor.AutowireMode>
,Constable
- Enclosing class:
- TestConstructor
Defines autowiring modes for parameters in a test constructor.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAll test constructor parameters will be autowired as if the constructor itself were annotated with@Autowired
.Each individual test constructor parameter will only be autowired if it is annotated with@Autowired
,@Qualifier
, or@Value
, or if the constructor itself is annotated with@Autowired
. -
Method Summary
Modifier and TypeMethodDescriptionstatic TestConstructor.AutowireMode
Get theAutowireMode
enum constant with the supplied name, ignoring case.static TestConstructor.AutowireMode
Returns the enum constant of this class with the specified name.static TestConstructor.AutowireMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALL
All test constructor parameters will be autowired as if the constructor itself were annotated with@Autowired
.- See Also:
-
ANNOTATED
Each individual test constructor parameter will only be autowired if it is annotated with@Autowired
,@Qualifier
, or@Value
, or if the constructor itself is annotated with@Autowired
.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
from
Get theAutowireMode
enum constant with the supplied name, ignoring case.- Parameters:
name
- the name of the enum constant to retrieve- Returns:
- the corresponding enum constant or
null
if not found - Since:
- 5.3
- See Also:
-