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:
ElementKindTypeKind- on a per class level
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionReturns 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 bytargetType().
-
Element Details
-
targetType
String targetTypeReturns the string representation of the type for which a strategy should be registered. Valid types for registration are:ElementKindTypeKind- on a per class level
- Returns:
- the target type representation
-
valueProviderCallback
String valueProviderCallbackReturns the code that should be executed to provide the value for all constants of the same type as specified bytargetType(). The line of code can execute information about the field for which the value should be provided via the variable field of typeVariableElement.- Returns:
- the code to provide values for all constants of a type
-