Class ObjectValueProvider

java.lang.Object
nl.jqno.equalsverifier.internal.valueproviders.ObjectValueProvider
All Implemented Interfaces:
ValueProvider

public class ObjectValueProvider extends Object implements ValueProvider
A ValueProvider that can instantiate regular objects.
  • Field Details

    • vp

      private final ValueProvider vp
    • objenesis

      private final org.objenesis.Objenesis objenesis
    • forceFinalMeansFinal

      private final boolean forceFinalMeansFinal
  • Constructor Details

    • ObjectValueProvider

      public ObjectValueProvider(ValueProvider vp, org.objenesis.Objenesis objenesis, boolean forceFinalMeansFinal)
  • Method Details

    • provide

      public <T> Optional<Tuple<T>> provide(TypeTag tag, Attributes attributes)
      Returns a tuple of two different prefabricated values of the specified type.}
      Specified by:
      provide in interface ValueProvider
      Type Parameters:
      T - The returned tuple will have this generic type.
      Parameters:
      tag - A description of the desired type, including generic parameters.
      attributes - The attributes of the field that the provided values must be linked to.
      Returns:
      A tuple of two different values of the given type, or an empty Optional if none could be found.
    • determineValues

      private <T> Tuple<Map<Field,Object>> determineValues(Class<T> actualType, TypeTag tag, Attributes attributes)