Package org.commonmark.internal
Class InlineParserImpl.LinkInfoImpl
- java.lang.Object
-
- org.commonmark.internal.InlineParserImpl.LinkInfoImpl
-
- All Implemented Interfaces:
LinkInfo
- Enclosing class:
- InlineParserImpl
private static class InlineParserImpl.LinkInfoImpl extends java.lang.Object implements LinkInfo
-
-
Field Summary
Fields Modifier and Type Field Description private Position
afterTextBracket
private java.lang.String
destination
private java.lang.String
label
private Text
marker
private Text
openingBracket
private java.lang.String
text
private java.lang.String
title
-
Constructor Summary
Constructors Modifier Constructor Description private
LinkInfoImpl(Text marker, Text openingBracket, java.lang.String text, java.lang.String label, java.lang.String destination, java.lang.String title, Position afterTextBracket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Position
afterTextBracket()
The position after the closing text bracket, e.g.:java.lang.String
destination()
The destination if available, e.g.java.lang.String
label()
The label, or null for inline links or for shortcut links (in which caseLinkInfo.text()
should be used as the label).Text
marker()
The marker if present, or null.Text
openingBracket()
The text node of the opening bracket[
.java.lang.String
text()
The text between the first brackets, e.g.java.lang.String
title()
The title if available, e.g.
-
-
-
Field Detail
-
marker
private final Text marker
-
openingBracket
private final Text openingBracket
-
text
private final java.lang.String text
-
label
private final java.lang.String label
-
destination
private final java.lang.String destination
-
title
private final java.lang.String title
-
afterTextBracket
private final Position afterTextBracket
-
-
Method Detail
-
marker
public Text marker()
Description copied from interface:LinkInfo
The marker if present, or null. A marker is e.g.!
for an image, or a custom marker as specified inParser.Builder.linkMarker(java.lang.Character)
.
-
openingBracket
public Text openingBracket()
Description copied from interface:LinkInfo
The text node of the opening bracket[
.- Specified by:
openingBracket
in interfaceLinkInfo
-
text
public java.lang.String text()
Description copied from interface:LinkInfo
The text between the first brackets, e.g. `foo` in `[foo][bar]`.
-
label
public java.lang.String label()
Description copied from interface:LinkInfo
The label, or null for inline links or for shortcut links (in which caseLinkInfo.text()
should be used as the label).
-
destination
public java.lang.String destination()
Description copied from interface:LinkInfo
The destination if available, e.g. in `[foo](destination)`, or null- Specified by:
destination
in interfaceLinkInfo
-
title
public java.lang.String title()
Description copied from interface:LinkInfo
The title if available, e.g. in `[foo](destination "title")`, or null
-
afterTextBracket
public Position afterTextBracket()
Description copied from interface:LinkInfo
The position after the closing text bracket, e.g.:[foo][bar] ^
- Specified by:
afterTextBracket
in interfaceLinkInfo
-
-