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 addDiffNodes for empty lines (regardless of theirDiffType). IfcollapseMultipleCodeLinesistrueempty lines are also not added to existingDiffNodes.
public record VariationDiffParseOptions(AnnotationParser annotationParser, boolean collapseMultipleCodeLines, boolean ignoreEmptyLines)
extends Record
Parse options that should be used when parsing
VariationDiffs.- Author:
- Paul Bittner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AnnotationParserThe field for theannotationParserrecord component.private final booleanThe field for thecollapseMultipleCodeLinesrecord component.static final VariationDiffParseOptionsDefault value for VariationDiffParseOptions that does not remember parsed unix diffs and uses the default value for the parsing annotations (CPPAnnotationParser).private final booleanThe field for theignoreEmptyLinesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionVariationDiffParseOptions(boolean collapseMultipleCodeLines, boolean ignoreEmptyLines) Creates VariationDiffParseOptions with the default parser as specified inDefault.VariationDiffParseOptions(AnnotationParser annotationParser, boolean collapseMultipleCodeLines, boolean ignoreEmptyLines) Creates an instance of aVariationDiffParseOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationParserrecord component.booleanReturns the value of thecollapseMultipleCodeLinesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theignoreEmptyLinesrecord component.final StringtoString()Returns a string representation of this record class.withAnnotationParser(AnnotationParser annotationParser) Creates VariationDiffParseOptions with the given annotation parser.
-
Field Details
-
annotationParser
The field for theannotationParserrecord component. -
collapseMultipleCodeLines
private final boolean collapseMultipleCodeLinesThe field for thecollapseMultipleCodeLinesrecord component. -
ignoreEmptyLines
private final boolean ignoreEmptyLinesThe field for theignoreEmptyLinesrecord component. -
Default
Default value for VariationDiffParseOptions that does not remember parsed unix diffs and uses the default value for the parsing annotations (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 aVariationDiffParseOptionsrecord class.- Parameters:
annotationParser- the value for theannotationParserrecord componentcollapseMultipleCodeLines- the value for thecollapseMultipleCodeLinesrecord componentignoreEmptyLines- the value for theignoreEmptyLinesrecord 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 theannotationParserrecord component.- Returns:
- the value of the
annotationParserrecord component
-
collapseMultipleCodeLines
public boolean collapseMultipleCodeLines()Returns the value of thecollapseMultipleCodeLinesrecord component.- Returns:
- the value of the
collapseMultipleCodeLinesrecord component
-
ignoreEmptyLines
public boolean ignoreEmptyLines()Returns the value of theignoreEmptyLinesrecord component.- Returns:
- the value of the
ignoreEmptyLinesrecord component
-