Package org.commonmark.node
Class Link
java.lang.Object
org.commonmark.node.Node
org.commonmark.node.Link
A link with a destination and an optional title; the link text is in child nodes.
Example for an inline link in a CommonMark document:
[link](/uri "title")
The corresponding Link node would look like this:
getDestination()
returns"/uri"
getTitle()
returns"title"
- A
Text
child node withgetLiteral
that returns"link"
Note that the text in the link can contain inline formatting, so it could also contain an Image
or
Emphasis
, etc.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
getTitle()
void
setDestination
(String destination) void
protected String
Methods inherited from class org.commonmark.node.Node
addSourceSpan, appendChild, getFirstChild, getLastChild, getNext, getParent, getPrevious, getSourceSpans, insertAfter, insertBefore, prependChild, setParent, setSourceSpans, toString, unlink
-
Field Details
-
destination
-
title
-
-
Constructor Details
-
Link
public Link() -
Link
-
-
Method Details
-
accept
-
getDestination
-
setDestination
-
getTitle
- Returns:
- the title or null
-
setTitle
-
toStringAttributes
- Overrides:
toStringAttributes
in classNode
-