public abstract class NodeRepositoryFormatter<R extends com.vladsch.flexmark.ast.NodeRepository<B>,B extends com.vladsch.flexmark.ast.Node & com.vladsch.flexmark.ast.ReferenceNode<R,B,N>,N extends com.vladsch.flexmark.ast.Node & com.vladsch.flexmark.ast.ReferencingNode<R,B>> extends Object implements PhasedNodeFormatter
| Modifier and Type | Field and Description |
|---|---|
static HashSet<FormattingPhase> |
FORMATTING_PHASES |
protected B |
lastReference |
protected Comparator<B> |
myComparator |
protected boolean |
recheckUndefinedReferences |
protected List<B> |
referenceList |
protected R |
referenceRepository |
protected boolean |
repositoryNodesDone |
protected HashSet<com.vladsch.flexmark.ast.Node> |
unusedReferences |
| Constructor and Description |
|---|
NodeRepositoryFormatter(com.vladsch.flexmark.util.options.DataHolder options,
com.vladsch.flexmark.util.options.DataKey<Map<String,String>> referenceMapKey) |
| Modifier and Type | Method and Description |
|---|---|
Set<FormattingPhase> |
getFormattingPhases() |
Comparator<B> |
getReferenceComparator() |
abstract com.vladsch.flexmark.util.format.options.ElementPlacement |
getReferencePlacement() |
abstract com.vladsch.flexmark.util.format.options.ElementPlacementSort |
getReferenceSort() |
abstract R |
getRepository(com.vladsch.flexmark.util.options.DataHolder options) |
protected com.vladsch.flexmark.util.format.options.ElementPlacement |
getTranslationReferencePlacement() |
String |
modifyTransformedReference(String transformedReferenceId,
NodeFormatterContext context) |
void |
renderDocument(NodeFormatterContext context,
MarkdownWriter markdown,
com.vladsch.flexmark.ast.Document document,
FormattingPhase phase)
Render the specified node.
|
protected void |
renderReference(B node,
NodeFormatterContext context,
MarkdownWriter markdown) |
abstract void |
renderReferenceBlock(B node,
NodeFormatterContext context,
MarkdownWriter markdown) |
protected String |
transformReferenceId(String nodeText,
NodeFormatterContext context) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNodeClasses, getNodeFormattingHandlerspublic static final HashSet<FormattingPhase> FORMATTING_PHASES
protected final R extends com.vladsch.flexmark.ast.NodeRepository<B> referenceRepository
protected final List<B extends com.vladsch.flexmark.ast.Node & com.vladsch.flexmark.ast.ReferenceNode<R,B,N>> referenceList
protected final HashSet<com.vladsch.flexmark.ast.Node> unusedReferences
protected final B extends com.vladsch.flexmark.ast.Node & com.vladsch.flexmark.ast.ReferenceNode<R,B,N> lastReference
protected boolean recheckUndefinedReferences
protected boolean repositoryNodesDone
protected final Comparator<B extends com.vladsch.flexmark.ast.Node & com.vladsch.flexmark.ast.ReferenceNode<R,B,N>> myComparator
public Comparator<B> getReferenceComparator()
public abstract R getRepository(com.vladsch.flexmark.util.options.DataHolder options)
public abstract com.vladsch.flexmark.util.format.options.ElementPlacement getReferencePlacement()
public abstract com.vladsch.flexmark.util.format.options.ElementPlacementSort getReferenceSort()
public abstract void renderReferenceBlock(B node, NodeFormatterContext context, MarkdownWriter markdown)
protected com.vladsch.flexmark.util.format.options.ElementPlacement getTranslationReferencePlacement()
public String modifyTransformedReference(String transformedReferenceId, NodeFormatterContext context)
protected String transformReferenceId(String nodeText, NodeFormatterContext context)
public Set<FormattingPhase> getFormattingPhases()
getFormattingPhases in interface PhasedNodeFormatterpublic void renderDocument(NodeFormatterContext context, MarkdownWriter markdown, com.vladsch.flexmark.ast.Document document, FormattingPhase phase)
PhasedNodeFormatterrenderDocument in interface PhasedNodeFormattercontext - node renderer context instancemarkdown - markdown writer instancedocument - the document node to renderphase - rendering phase for which to generate the output. Will be any of FormattingPhase except FormattingPhase.DOCUMENT because this phase is used for the non-phased node renderingprotected void renderReference(B node, NodeFormatterContext context, MarkdownWriter markdown)
Copyright © 2018. All rights reserved.