Package org.codehaus.groovy.tools.groovydoc

# Class LinkArgument

java.lang.Object
org.codehaus.groovy.tools.groovydoc.LinkArgument

public class LinkArgument extends Object
Represents a link pair (href, packages) with optional JPMS module. The packages are comma separated. When a module is specified, the module name is inserted between the base href and the package path, matching the JPMS-era Javadoc layout (e.g. `.../api/java.base/java/lang/Object.html`).

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LinkArgument()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getHref()`
  Get the href attribute, with the module name appended when set.
  `String`
  `getModule()`
  Get the module attribute.
  `String`
  `getPackages()`
  Get the packages attribute.
  `void`
  `setHref(String hr)`
  Set the href attribute.
  `void`
  `setModule(String module)`
  Set the module attribute.
  `void`
  `setPackages(String packages)`
  Set the packages attribute.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LinkArgument

    public LinkArgument()

- ## Method Details

  - ### getPackages

    public String getPackages()
    Get the packages attribute.
    Returns:
      the packages attribute.

  - ### setPackages

    public void setPackages(String packages)
    Set the packages attribute.
    Parameters:
      `packages` - the comma separated package prefixes corresponding to this link

  - ### getHref

    public String getHref()
    Get the href attribute, with the module name appended when set. For pre-JPMS external docs, returns the raw href; for JPMS-aware external docs (e.g. JDK 9+), returns `href + module + "/"`.
    Returns:
      the effective base URL for this link

  - ### setHref

    public void setHref(String hr)
    Set the href attribute.
    Parameters:
      `hr` - a `String` value representing the URL to use for this link

  - ### getModule

    public String getModule()
    Get the module attribute.
    Returns:
      the module attribute, or an empty string if not set
    Since:
      6.0.0

  - ### setModule

    public void setModule(String module)
    Set the module attribute. When set, the module name is inserted between the base href and the package path, yielding JPMS-era Javadoc URLs such as `.../api/java.base/java/lang/Object.html`.
    Parameters:
      `module` - the JPMS module name (e.g. `java.base`)
    Since:
      6.0.0