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