Class DiffConfig
java.lang.Object
eu.maveniverse.domtrip.DiffConfig
Configuration for XML diff operations.
Controls how elements are matched between two documents. By default, elements are matched positionally among same-name siblings. Configuring match keys enables identity-based matching for domain-specific element types.
Example:
DiffConfig config = DiffConfig.builder()
.matchBy("dependency", "groupId", "artifactId")
.matchBy("*", "id")
.build();
- Since:
- 1.3.0
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic DiffConfig.Builderbuilder()Returns a new builder for constructing a custom configuration.static DiffConfigdefaults()Returns a default configuration with no match keys.matchKeysFor(String elementName) Returns the match key attribute or child element names for the given element name, falling back to wildcard keys if no specific keys are configured.
-
Method Details
-
defaults
Returns a default configuration with no match keys.- Returns:
- the default configuration
-
builder
Returns a new builder for constructing a custom configuration.- Returns:
- a new builder instance
-
matchKeysFor
Returns the match key attribute or child element names for the given element name, falling back to wildcard keys if no specific keys are configured.- Parameters:
elementName- the element name to look up- Returns:
- the list of key names, or an empty list if none configured
-