Package org.approvej.review
Record Class AutomaticReviewer
java.lang.Object
java.lang.Record
org.approvej.review.AutomaticReviewer
- All Implemented Interfaces:
Function<PathProvider,,ReviewResult> Provider<Reviewer>,Reviewer,ReviewerProvider
A
Reviewer 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!
-
Field Summary
Fields inherited from interface org.approvej.review.Reviewer
APPROVED_PLACEHOLDER, RECEIVED_PLACEHOLDER -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aAutomaticReviewerrecord 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.ReviewerProvider
type
-
Constructor Details
-
AutomaticReviewer
public AutomaticReviewer()Creates an instance of aAutomaticReviewerrecord 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.
-
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.
-
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.
-