Class AlignOptions.Builder

java.lang.Object
eu.maveniverse.domtrip.maven.AlignOptions.Builder
Enclosing class:
AlignOptions

public static final class AlignOptions.Builder extends Object
Builder for AlignOptions.
Since:
1.1.0
  • Method Details

    • versionStyle

      public AlignOptions.Builder versionStyle(AlignOptions.VersionStyle versionStyle)
      Sets the version style override.
      Parameters:
      versionStyle - the version style (null for auto-detection)
      Returns:
      this builder
    • versionSource

      public AlignOptions.Builder versionSource(AlignOptions.VersionSource versionSource)
      Sets the version source override.
      Parameters:
      versionSource - the version source (null for auto-detection)
      Returns:
      this builder
    • namingConvention

      public AlignOptions.Builder namingConvention(AlignOptions.PropertyNamingConvention namingConvention)
      Sets the property naming convention override.
      Parameters:
      namingConvention - the naming convention (null for auto-detection)
      Returns:
      this builder
    • propertyNameGenerator

      public AlignOptions.Builder propertyNameGenerator(Function<Coordinates, String> generator)
      Set a custom function that generates property names from dependency coordinates.

      Allows arbitrary naming patterns beyond the built-in conventions.

      Example:

      .propertyNameGenerator(coords ->
          coords.groupId().replace(".", "-") + "." + coords.artifactId() + ".version")
      
      Parameters:
      generator - the function to generate property names (null to clear)
      Returns:
      this builder
      Since:
      1.1.0
    • propertyName

      public AlignOptions.Builder propertyName(String propertyName)
      Sets an explicit property name, overriding auto-generation.
      Parameters:
      propertyName - the property name to use
      Returns:
      this builder
    • scope

      public AlignOptions.Builder scope(String scope)
      Sets the dependency scope.
      Parameters:
      scope - the scope (e.g., "test", "provided")
      Returns:
      this builder
    • build

      public AlignOptions build()
      Create an AlignOptions configured with the builder's current settings.

      No validation or additional processing is performed; the builder's field values (which may be null) are copied directly into the created instance.

      Returns:
      the constructed AlignOptions