Module nl.jqno.equalsverifier
Record Class Configuration<T>
java.lang.Object
java.lang.Record
nl.jqno.equalsverifier.internal.util.Configuration<T>
public record Configuration<T>(Class<T> type, TypeTag typeTag, InstanceFactory<T> factory, InstanceFactory<? extends T> subclassFactory, Set<String> ignoredFields, Set<String> nonnullFields, Set<String> prefabbedFields, AnnotationCache annotationCache, CachedHashCodeInitializer<T> cachedHashCodeInitializer, boolean hasRedefinedSuperclass, InstanceFactory<?> redefinedSuperclassFactory, Class<? extends T> redefinedSubclass, InstanceFactory<? extends T> redefinedSubclassFactory, boolean usingGetClass, EnumSet<Warning> warningsToSuppress, Set<Mode> modes, Function<String,String> fieldnameToGetter, boolean isKotlin, List<T> equalExamples, List<T> unequalExamples)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AnnotationCacheThe field for theannotationCacherecord component.private final CachedHashCodeInitializer<T> The field for thecachedHashCodeInitializerrecord component.The field for theequalExamplesrecord component.private final InstanceFactory<T> The field for thefactoryrecord component.The field for thefieldnameToGetterrecord component.private final booleanThe field for thehasRedefinedSuperclassrecord component.The field for theignoredFieldsrecord component.private final booleanThe field for theisKotlinrecord component.The field for themodesrecord component.The field for thenonnullFieldsrecord component.The field for theprefabbedFieldsrecord component.The field for theredefinedSubclassrecord component.private final InstanceFactory<? extends T> The field for theredefinedSubclassFactoryrecord component.private final InstanceFactory<?> The field for theredefinedSuperclassFactoryrecord component.private final InstanceFactory<? extends T> The field for thesubclassFactoryrecord component.The field for thetyperecord component.private final TypeTagThe field for thetypeTagrecord component.The field for theunequalExamplesrecord component.private final booleanThe field for theusingGetClassrecord component.The field for thewarningsToSuppressrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionConfiguration(Class<T> type, TypeTag typeTag, InstanceFactory<T> factory, InstanceFactory<? extends T> subclassFactory, Set<String> ignoredFields, Set<String> nonnullFields, Set<String> prefabbedFields, AnnotationCache annotationCache, CachedHashCodeInitializer<T> cachedHashCodeInitializer, boolean hasRedefinedSuperclass, InstanceFactory<?> redefinedSuperclassFactory, Class<? extends T> redefinedSubclass, InstanceFactory<? extends T> redefinedSubclassFactory, boolean usingGetClass, EnumSet<Warning> warningsToSuppress, Set<Mode> modes, Function<String, String> fieldnameToGetter, boolean isKotlin, List<T> equalExamples, List<T> unequalExamples) Creates an instance of aConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationCacherecord component.static <T> Configuration<T> build(Class<T> type, InstanceFactory<T> factory, InstanceFactory<? extends T> subclassFactory, Set<String> excludedFields, Set<String> includedFields, Set<String> nonnullFields, Set<String> prefabbedFields, CachedHashCodeInitializer<T> cachedHashCodeInitializer, boolean hasRedefinedSuperclass, InstanceFactory<?> redefinedSuperclassFactory, Class<? extends T> redefinedSubclass, InstanceFactory<? extends T> redefinedSubclassFactory, boolean usingGetClass, EnumSet<Warning> warningsToSuppress, Set<Mode> modes, Function<String, String> fieldnameToGetter, Set<String> ignoredAnnotationClassNames, Set<String> actualFields, List<T> equalExamples, List<T> unequalExamples) private static <T> AnnotationCachebuildAnnotationCache(Class<T> type, Set<String> ignoredAnnotationClassNames) Returns the value of thecachedHashCodeInitializerrecord component.private static StringdefaulFieldNameToGetterConverter(String fieldName) determineAnnotationlessIgnoredFields(Set<String> excludedFields, Set<String> includedFields, Set<String> actualFields) determineIgnoredFields(Class<T> type, AnnotationCache annotationCache, EnumSet<Warning> warningsToSuppress, Set<String> excludedFields, Set<String> includedFields, Set<String> actualFields) Returns the value of theequalExamplesrecord component.final booleanIndicates whether some other object is "equal to" this one.factory()Returns the value of thefactoryrecord component.Returns the value of thefieldnameToGetterrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasRedefinedSuperclassrecord component.Returns the value of theignoredFieldsrecord component.booleanisKotlin()Returns the value of theisKotlinrecord component.modes()Returns the value of themodesrecord component.Returns the value of thenonnullFieldsrecord component.Returns the value of theprefabbedFieldsrecord component.Returns the value of theredefinedSubclassrecord component.InstanceFactory<? extends T> Returns the value of theredefinedSubclassFactoryrecord component.Returns the value of theredefinedSuperclassFactoryrecord component.InstanceFactory<? extends T> Returns the value of thesubclassFactoryrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.typeTag()Returns the value of thetypeTagrecord component.Returns the value of theunequalExamplesrecord component.booleanReturns the value of theusingGetClassrecord component.Returns the value of thewarningsToSuppressrecord component.
-
Field Details
-
type
The field for thetyperecord component. -
typeTag
The field for thetypeTagrecord component. -
factory
The field for thefactoryrecord component. -
subclassFactory
The field for thesubclassFactoryrecord component. -
ignoredFields
The field for theignoredFieldsrecord component. -
nonnullFields
The field for thenonnullFieldsrecord component. -
prefabbedFields
The field for theprefabbedFieldsrecord component. -
annotationCache
The field for theannotationCacherecord component. -
cachedHashCodeInitializer
The field for thecachedHashCodeInitializerrecord component. -
hasRedefinedSuperclass
private final boolean hasRedefinedSuperclassThe field for thehasRedefinedSuperclassrecord component. -
redefinedSuperclassFactory
The field for theredefinedSuperclassFactoryrecord component. -
redefinedSubclass
The field for theredefinedSubclassrecord component. -
redefinedSubclassFactory
The field for theredefinedSubclassFactoryrecord component. -
usingGetClass
private final boolean usingGetClassThe field for theusingGetClassrecord component. -
warningsToSuppress
The field for thewarningsToSuppressrecord component. -
modes
The field for themodesrecord component. -
fieldnameToGetter
The field for thefieldnameToGetterrecord component. -
isKotlin
private final boolean isKotlinThe field for theisKotlinrecord component. -
equalExamples
The field for theequalExamplesrecord component. -
unequalExamples
The field for theunequalExamplesrecord component.
-
-
Constructor Details
-
Configuration
public Configuration(Class<T> type, TypeTag typeTag, InstanceFactory<T> factory, InstanceFactory<? extends T> subclassFactory, Set<String> ignoredFields, Set<String> nonnullFields, Set<String> prefabbedFields, AnnotationCache annotationCache, CachedHashCodeInitializer<T> cachedHashCodeInitializer, boolean hasRedefinedSuperclass, InstanceFactory<?> redefinedSuperclassFactory, Class<? extends T> redefinedSubclass, InstanceFactory<? extends T> redefinedSubclassFactory, boolean usingGetClass, EnumSet<Warning> warningsToSuppress, Set<Mode> modes, Function<String, String> fieldnameToGetter, boolean isKotlin, List<T> equalExamples, List<T> unequalExamples) Creates an instance of aConfigurationrecord class.- Parameters:
type- the value for thetyperecord componenttypeTag- the value for thetypeTagrecord componentfactory- the value for thefactoryrecord componentsubclassFactory- the value for thesubclassFactoryrecord componentignoredFields- the value for theignoredFieldsrecord componentnonnullFields- the value for thenonnullFieldsrecord componentprefabbedFields- the value for theprefabbedFieldsrecord componentannotationCache- the value for theannotationCacherecord componentcachedHashCodeInitializer- the value for thecachedHashCodeInitializerrecord componenthasRedefinedSuperclass- the value for thehasRedefinedSuperclassrecord componentredefinedSuperclassFactory- the value for theredefinedSuperclassFactoryrecord componentredefinedSubclass- the value for theredefinedSubclassrecord componentredefinedSubclassFactory- the value for theredefinedSubclassFactoryrecord componentusingGetClass- the value for theusingGetClassrecord componentwarningsToSuppress- the value for thewarningsToSuppressrecord componentmodes- the value for themodesrecord componentfieldnameToGetter- the value for thefieldnameToGetterrecord componentisKotlin- the value for theisKotlinrecord componentequalExamples- the value for theequalExamplesrecord componentunequalExamples- the value for theunequalExamplesrecord component
-
-
Method Details
-
build
public static <T> Configuration<T> build(Class<T> type, InstanceFactory<T> factory, InstanceFactory<? extends T> subclassFactory, Set<String> excludedFields, Set<String> includedFields, Set<String> nonnullFields, Set<String> prefabbedFields, CachedHashCodeInitializer<T> cachedHashCodeInitializer, boolean hasRedefinedSuperclass, InstanceFactory<?> redefinedSuperclassFactory, Class<? extends T> redefinedSubclass, InstanceFactory<? extends T> redefinedSubclassFactory, boolean usingGetClass, EnumSet<Warning> warningsToSuppress, Set<Mode> modes, Function<String, String> fieldnameToGetter, Set<String> ignoredAnnotationClassNames, Set<String> actualFields, List<T> equalExamples, List<T> unequalExamples) -
buildAnnotationCache
private static <T> AnnotationCache buildAnnotationCache(Class<T> type, Set<String> ignoredAnnotationClassNames) -
determineIgnoredFields
-
determineAnnotationlessIgnoredFields
-
defaulFieldNameToGetterConverter
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
typeTag
Returns the value of thetypeTagrecord component.- Returns:
- the value of the
typeTagrecord component
-
factory
Returns the value of thefactoryrecord component.- Returns:
- the value of the
factoryrecord component
-
subclassFactory
Returns the value of thesubclassFactoryrecord component.- Returns:
- the value of the
subclassFactoryrecord component
-
ignoredFields
Returns the value of theignoredFieldsrecord component.- Returns:
- the value of the
ignoredFieldsrecord component
-
nonnullFields
Returns the value of thenonnullFieldsrecord component.- Returns:
- the value of the
nonnullFieldsrecord component
-
prefabbedFields
Returns the value of theprefabbedFieldsrecord component.- Returns:
- the value of the
prefabbedFieldsrecord component
-
annotationCache
Returns the value of theannotationCacherecord component.- Returns:
- the value of the
annotationCacherecord component
-
cachedHashCodeInitializer
Returns the value of thecachedHashCodeInitializerrecord component.- Returns:
- the value of the
cachedHashCodeInitializerrecord component
-
hasRedefinedSuperclass
public boolean hasRedefinedSuperclass()Returns the value of thehasRedefinedSuperclassrecord component.- Returns:
- the value of the
hasRedefinedSuperclassrecord component
-
redefinedSuperclassFactory
Returns the value of theredefinedSuperclassFactoryrecord component.- Returns:
- the value of the
redefinedSuperclassFactoryrecord component
-
redefinedSubclass
Returns the value of theredefinedSubclassrecord component.- Returns:
- the value of the
redefinedSubclassrecord component
-
redefinedSubclassFactory
Returns the value of theredefinedSubclassFactoryrecord component.- Returns:
- the value of the
redefinedSubclassFactoryrecord component
-
usingGetClass
public boolean usingGetClass()Returns the value of theusingGetClassrecord component.- Returns:
- the value of the
usingGetClassrecord component
-
warningsToSuppress
Returns the value of thewarningsToSuppressrecord component.- Returns:
- the value of the
warningsToSuppressrecord component
-
modes
Returns the value of themodesrecord component.- Returns:
- the value of the
modesrecord component
-
fieldnameToGetter
Returns the value of thefieldnameToGetterrecord component.- Returns:
- the value of the
fieldnameToGetterrecord component
-
isKotlin
public boolean isKotlin()Returns the value of theisKotlinrecord component.- Returns:
- the value of the
isKotlinrecord component
-
equalExamples
Returns the value of theequalExamplesrecord component.- Returns:
- the value of the
equalExamplesrecord component
-
unequalExamples
Returns the value of theunequalExamplesrecord component.- Returns:
- the value of the
unequalExamplesrecord component
-