Module nl.jqno.equalsverifier
Interface Instantiator<T>
- All Known Implementing Classes:
ClassConstructorInstantiator,ProvidedFactoryInstantiator,RecordConstructorInstantiator,ReflectionInstantiator
public interface Instantiator<T>
Creates an instance of a class or record.
-
Method Summary
-
Method Details
-
instantiate
Creates an instance of the given type, with its field set to the given values. If no value is given for a specific field, the field will be set to its default value: null for object references, 0 for numbers, false for booleans.- Parameters:
values- Values to assign to the instance's fields.- Returns:
- An instance with assigned values.
-
copy
Creates a new instance with all fields set to the same value as their counterparts fromoriginal.- Parameters:
original- The instance to copy.- Returns:
- A copy of the given original.
-