Class AlignOptions.Builder

  • Enclosing class:
    AlignOptions

    public static final class AlignOptions.Builder
    extends java.lang.Object
    Builder for AlignOptions.
    Since:
    1.1.0
    • Method Detail

      • 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
      • propertyNameGenerator

        public AlignOptions.Builder propertyNameGenerator​(java.util.function.Function<Coordinates,​java.lang.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​(java.lang.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​(java.lang.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