Interface ValueProvider
- All Known Implementing Classes:
BooleanValueProvider,ByteValueProvider,CharacterValueProvider,ClassValueProvider,ContainerValueProvider,DeclaredTypeValueProvider,DoubleValueProvider,EnumValueProvider,FloatValueProvider,IntegerValueProvider,LongValueProvider,ShortValueProvider,StringValueProvider,UUIDValueProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Defines a function that provides a string representation of a value used to construct a constant using a provided field.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default constant value if all other strategies for generation fail. -
Method Summary
Modifier and TypeMethodDescriptionprovideValueAsString(Element field, TypeMetadata metadata) Returns a string representation of a value that will be used when creating a constant for the specified field.
-
Field Details
-
DEFAULT_VALUE
The default constant value if all other strategies for generation fail.- See Also:
-
-
Method Details
-
provideValueAsString
Returns a string representation of a value that will be used when creating a constant for the specified field.- Parameters:
field- - for which the value is being providedmetadata- - used for creating the fixture- Returns:
- the string representation of the value
-