Package icyllis.modernui.markdown

# Class MarkdownConfig.Builder

java.lang.Object
icyllis.modernui.markdown.MarkdownConfig.Builder

Enclosing class:
  `MarkdownConfig`

public static final class MarkdownConfig.Builder extends Object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<N extends com.vladsch.flexmark.util.ast.Node>
  MarkdownConfig.Builder`
  `addVisitor(Class<? extends N> clazz, NodeVisitor<? super N> visitor)`
  Override any existing visitor for the given type.
  `<N extends com.vladsch.flexmark.util.ast.Node>
  MarkdownConfig.Builder`
  `appendSpanFactory(Class<? extends N> clazz, SpanFactory<? super N> factory)`
  Append a factory to existing one (or make the first one for specified node).
  `MarkdownConfig`
  `build(MarkdownTheme theme)`
  `<N extends com.vladsch.flexmark.util.ast.Node>
  SpanFactory<N>`
  `getSpanFactory(Class<N> node)`
  Can be useful when enhancing an already defined SpanFactory with another one.
  `<N extends com.vladsch.flexmark.util.ast.Node>
  MarkdownConfig.Builder`
  `prependSpanFactory(Class<? extends N> clazz, SpanFactory<? super N> factory)`
  Prepend a factory to existing one (or make the first one for specified node).
  `MarkdownConfig.Builder`
  `setBlockHandler(BlockHandler blockHandler)`
  `<N extends com.vladsch.flexmark.util.ast.Node>
  MarkdownConfig.Builder`
  `setSpanFactory(Class<? extends N> clazz, SpanFactory<? super N> factory)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### addVisitor

    @NonNull public <N extends com.vladsch.flexmark.util.ast.Node> MarkdownConfig.Builder addVisitor(@NonNull Class<? extends N> clazz, @Nullable NodeVisitor<? super N> visitor)
    Override any existing visitor for the given type.
    Parameters:
      `clazz` - node type (exact class)
      `visitor` - `NodeVisitor` to be used, null to remove existing
    Returns:
      this

  - ### setSpanFactory

    @NonNull public <N extends com.vladsch.flexmark.util.ast.Node> MarkdownConfig.Builder setSpanFactory(@NonNull Class<? extends N> clazz, @Nullable SpanFactory<? super N> factory)

  - ### appendSpanFactory

    @NonNull public <N extends com.vladsch.flexmark.util.ast.Node> MarkdownConfig.Builder appendSpanFactory(@NonNull Class<? extends N> clazz, @NonNull SpanFactory<? super N> factory)
    Append a factory to existing one (or make the first one for specified node). Specified factory will be called after original (if present) factory. Can be used to change behavior or original span factory.
    Parameters:
      `clazz` - node type
      `factory` - span factory
    Returns:
      this

  - ### prependSpanFactory

    @NonNull public <N extends com.vladsch.flexmark.util.ast.Node> MarkdownConfig.Builder prependSpanFactory(@NonNull Class<? extends N> clazz, @NonNull SpanFactory<? super N> factory)
    Prepend a factory to existing one (or make the first one for specified node). Specified factory will be called before original (if present) factory.
    Parameters:
      `clazz` - node type
      `factory` - span factory
    Returns:
      this

  - ### getSpanFactory

    @Nullable public <N extends com.vladsch.flexmark.util.ast.Node> SpanFactory<N> getSpanFactory(@NonNull Class<N> node)
    Can be useful when enhancing an already defined SpanFactory with another one.

  - ### setBlockHandler

    @NonNull public MarkdownConfig.Builder setBlockHandler(@Nullable BlockHandler blockHandler)
    Parameters:
      `blockHandler` - to handle block start/end
    Returns:
      this

  - ### build

    @NonNull public MarkdownConfig build(MarkdownTheme theme)