Class BaseDocLink

java.lang.Object
io.github.mmm.code.base.doc.BaseDocLink
All Implemented Interfaces:
io.github.mmm.code.api.doc.CodeDocLink

public class BaseDocLink extends Object implements io.github.mmm.code.api.doc.CodeDocLink
Base implementation of CodeDocLink.
Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
  • Constructor Details

    • BaseDocLink

      public BaseDocLink(String value, char separator, String owningType, Function<io.github.mmm.code.api.doc.CodeDocLink, String> urlProvider, Function<io.github.mmm.code.api.doc.CodeDocLink, Object> valueProvider)
      The constructor.
      Parameters:
      value - the content of the link tag ("@{link «value»}").
      separator - the package separator character.
      owningType - the (qualified) name of the owning type.
      urlProvider - the Function to resolve the URL.
      valueProvider - the Function to resolve the link value.
  • Method Details

    • getSimpleName

      public String getSimpleName()
      Specified by:
      getSimpleName in interface io.github.mmm.code.api.doc.CodeDocLink
      Returns:
      the simple name of the linked type.
    • getQualifiedName

      public String getQualifiedName()
      Specified by:
      getQualifiedName in interface io.github.mmm.code.api.doc.CodeDocLink
      Returns:
      the qualified name of the linked type. May be null if unqualified name was given. In such case it has to be looked up via imports.
    • getAnchor

      public String getAnchor()
      Specified by:
      getAnchor in interface io.github.mmm.code.api.doc.CodeDocLink
      Returns:
      the optional linked anchor or null for none.
    • getMethodLink

      public io.github.mmm.code.api.doc.CodeDocMethodLink getMethodLink()
      Specified by:
      getMethodLink in interface io.github.mmm.code.api.doc.CodeDocLink
      Returns:
      the optional BaseDocMethodLink if the anchor is a method reference or null for none.
    • getLinkedValue

      public Object getLinkedValue()
      Specified by:
      getLinkedValue in interface io.github.mmm.code.api.doc.CodeDocLink
    • getLinkUrl

      public String getLinkUrl()
      Specified by:
      getLinkUrl in interface io.github.mmm.code.api.doc.CodeDocLink
    • getText

      public String getText()
      Specified by:
      getText in interface io.github.mmm.code.api.doc.CodeDocLink
      Returns:
      the text of the link.
    • toString

      public String toString()
      Overrides:
      toString in class Object