Package org.approvej.review
Record Class AutomaticFileReviewer
java.lang.Object
java.lang.Record
org.approvej.review.AutomaticFileReviewer
- All Implemented Interfaces:
Function<PathProvider,,ReviewResult> Provider<FileReviewer>,FileReviewer,FileReviewerProvider
@NullMarked
public record AutomaticFileReviewer()
extends Record
implements FileReviewer, FileReviewerProvider
A
FileReviewer that accepts any given received value, ignoring the previously approved
value.
This may be a good idea when you have a lot of tests with changed results, and you simply want to update them all at once. You probably want to review the changed approved files before committing them to version control!
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aAutomaticFileReviewerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionalias()Returns the alias that can be used to reference this provider in configuration.apply(PathProvider pathProvider) create()Creates a new instance of the component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.approvej.review.FileReviewerProvider
type
-
Constructor Details
-
AutomaticFileReviewer
public AutomaticFileReviewer()Creates an instance of aAutomaticFileReviewerrecord class.
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<PathProvider,ReviewResult>
-
alias
Description copied from interface:ProviderReturns the alias that can be used to reference this provider in configuration.For example, "json" or "yaml" for print formats, or "none" or "automatic" for reviewers.
- Specified by:
aliasin interfaceProvider<FileReviewer>- Returns:
- the alias for this provider
-
create
Description copied from interface:ProviderCreates a new instance of the component.When implemented by the component class itself, this typically returns a new instance of the same class via its no-argument constructor.
- Specified by:
createin interfaceProvider<FileReviewer>- Returns:
- a new instance of the component
-
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.
-