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

public static enum TestConstructor.AutowireMode extends Enum<TestConstructor.AutowireMode>
Defines autowiring modes for parameters in a test constructor.
See Also:
  • Enum Constant Details

    • ALL

      public static final TestConstructor.AutowireMode ALL
      All test constructor parameters will be autowired as if the constructor itself were annotated with @Autowired.
      See Also:
    • ANNOTATED

      public static final TestConstructor.AutowireMode 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

      public static TestConstructor.AutowireMode[] 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

      public static TestConstructor.AutowireMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • from

      @Nullable public static TestConstructor.AutowireMode from(@Nullable String name)
      Get the AutowireMode 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: