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.

@FunctionalInterface public interface ValueProvider
Defines a function that provides a string representation of a value used to construct a constant using a provided field.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The default constant value if all other strategies for generation fail.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a string representation of a value that will be used when creating a constant for the specified field.
  • Field Details

    • DEFAULT_VALUE

      static final String DEFAULT_VALUE
      The default constant value if all other strategies for generation fail.
      See Also:
  • Method Details

    • provideValueAsString

      String provideValueAsString(Element field, TypeMetadata metadata)
      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 provided
      metadata - - used for creating the fixture
      Returns:
      the string representation of the value