Module nl.jqno.equalsverifier
Class ObjectValueProvider
java.lang.Object
nl.jqno.equalsverifier.internal.valueproviders.ObjectValueProvider
- All Implemented Interfaces:
ValueProvider
A ValueProvider that can instantiate regular objects.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final org.objenesis.Objenesisprivate final ValueProvider -
Constructor Summary
ConstructorsConstructorDescriptionObjectValueProvider(ValueProvider vp, org.objenesis.Objenesis objenesis, boolean forceFinalMeansFinal) -
Method Summary
Modifier and TypeMethodDescriptiondetermineValues(Class<T> actualType, TypeTag tag, Attributes attributes) provide(TypeTag tag, Attributes attributes) Returns a tuple of two different prefabricated values of the specified type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nl.jqno.equalsverifier.internal.valueproviders.ValueProvider
provideOrThrow
-
Field Details
-
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
Returns a tuple of two different prefabricated values of the specified type.}- Specified by:
providein interfaceValueProvider- 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
-