Record Class VariationDiffParseOptions
java.lang.Object
java.lang.Record
org.variantsync.diffdetective.variation.diff.parse.VariationDiffParseOptions
- Record Components:
annotationParser
- A parser for parsing annotations.collapseMultipleCodeLines
- Whether multiple consecutive code lines with the same diff type should be collapsed into a single artifact node.ignoreEmptyLines
- Whether to addDiffNode
s for empty lines (regardless of theirDiffType
). IfcollapseMultipleCodeLines
istrue
empty lines are also not added to existingDiffNode
s.
public record VariationDiffParseOptions(AnnotationParser annotationParser, boolean collapseMultipleCodeLines, boolean ignoreEmptyLines)
extends Record
Parse options that should be used when parsing
VariationDiff
s.- Author:
- Paul Bittner
-
Field Summary
Modifier and TypeFieldDescriptionprivate final AnnotationParser
The field for theannotationParser
record component.private final boolean
The field for thecollapseMultipleCodeLines
record component.static final VariationDiffParseOptions
Default value for VariationDiffParseOptions that does not remember parsed unix diffs and uses the default value for the parsing annotations (PreprocessorAnnotationParser.CPPAnnotationParser
).private final boolean
The field for theignoreEmptyLines
record component. -
Constructor Summary
ConstructorDescriptionVariationDiffParseOptions
(boolean collapseMultipleCodeLines, boolean ignoreEmptyLines) Creates VariationDiffParseOptions with the default parser as specified inDefault
.VariationDiffParseOptions
(AnnotationParser annotationParser, boolean collapseMultipleCodeLines, boolean ignoreEmptyLines) Creates an instance of aVariationDiffParseOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationParser
record component.boolean
Returns the value of thecollapseMultipleCodeLines
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theignoreEmptyLines
record component.final String
toString()
Returns a string representation of this record class.withAnnotationParser
(AnnotationParser annotationParser) Creates VariationDiffParseOptions with the given annotation parser.
-
Field Details
-
annotationParser
The field for theannotationParser
record component. -
collapseMultipleCodeLines
private final boolean collapseMultipleCodeLinesThe field for thecollapseMultipleCodeLines
record component. -
ignoreEmptyLines
private final boolean ignoreEmptyLinesThe field for theignoreEmptyLines
record component. -
Default
Default value for VariationDiffParseOptions that does not remember parsed unix diffs and uses the default value for the parsing annotations (PreprocessorAnnotationParser.CPPAnnotationParser
).
-
-
Constructor Details
-
VariationDiffParseOptions
public VariationDiffParseOptions(boolean collapseMultipleCodeLines, boolean ignoreEmptyLines) Creates VariationDiffParseOptions with the default parser as specified inDefault
. -
VariationDiffParseOptions
public VariationDiffParseOptions(AnnotationParser annotationParser, boolean collapseMultipleCodeLines, boolean ignoreEmptyLines) Creates an instance of aVariationDiffParseOptions
record class.- Parameters:
annotationParser
- the value for theannotationParser
record componentcollapseMultipleCodeLines
- the value for thecollapseMultipleCodeLines
record componentignoreEmptyLines
- the value for theignoreEmptyLines
record component
-
-
Method Details
-
withAnnotationParser
Creates VariationDiffParseOptions with the given annotation parser. -
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 '=='. -
annotationParser
Returns the value of theannotationParser
record component.- Returns:
- the value of the
annotationParser
record component
-
collapseMultipleCodeLines
public boolean collapseMultipleCodeLines()Returns the value of thecollapseMultipleCodeLines
record component.- Returns:
- the value of the
collapseMultipleCodeLines
record component
-
ignoreEmptyLines
public boolean ignoreEmptyLines()Returns the value of theignoreEmptyLines
record component.- Returns:
- the value of the
ignoreEmptyLines
record component
-