Annotation Interface FixtureValueProvider


@Target(TYPE) @Retention(SOURCE) @Repeatable(FixtureValueProviders.class) public @interface FixtureValueProvider
Defines a custom strategy used to provide all values matching the specified target type. There are three types for which custom value providers can be defined:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the string representation of the type for which a strategy should be registered.
    Returns the code that should be executed to provide the value for all constants of the same type as specified by targetType().
  • Element Details

    • targetType

      String targetType
      Returns the string representation of the type for which a strategy should be registered. Valid types for registration are:
      Returns:
      the target type representation
    • valueProviderCallback

      String valueProviderCallback
      Returns the code that should be executed to provide the value for all constants of the same type as specified by targetType(). The line of code can execute information about the field for which the value should be provided via the variable field of type VariableElement.
      Returns:
      the code to provide values for all constants of a type