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 PositionafterTextBracketprivate java.lang.Stringdestinationprivate java.lang.Stringlabelprivate Textmarkerprivate TextopeningBracketprivate java.lang.Stringtextprivate java.lang.Stringtitle
-
Constructor Summary
Constructors Modifier Constructor Description privateLinkInfoImpl(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 PositionafterTextBracket()The position after the closing text bracket, e.g.:java.lang.Stringdestination()The destination if available, e.g.java.lang.Stringlabel()The label, or null for inline links or for shortcut links (in which caseLinkInfo.text()should be used as the label).Textmarker()The marker if present, or null.TextopeningBracket()The text node of the opening bracket[.java.lang.Stringtext()The text between the first brackets, e.g.java.lang.Stringtitle()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:LinkInfoThe 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:LinkInfoThe text node of the opening bracket[.- Specified by:
openingBracketin interfaceLinkInfo
-
text
public java.lang.String text()
Description copied from interface:LinkInfoThe text between the first brackets, e.g. `foo` in `[foo][bar]`.
-
label
public java.lang.String label()
Description copied from interface:LinkInfoThe 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:LinkInfoThe destination if available, e.g. in `[foo](destination)`, or null- Specified by:
destinationin interfaceLinkInfo
-
title
public java.lang.String title()
Description copied from interface:LinkInfoThe title if available, e.g. in `[foo](destination "title")`, or null
-
afterTextBracket
public Position afterTextBracket()
Description copied from interface:LinkInfoThe position after the closing text bracket, e.g.:[foo][bar] ^- Specified by:
afterTextBracketin interfaceLinkInfo
-
-