Class Formatter.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • removeApiPoint

        protected void removeApiPoint​(@NotNull
                                      @NotNull java.lang.Object apiPoint)
        Description copied from class: BuilderBase
        Remove apiPoint from state information
        Specified by:
        removeApiPoint in class BuilderBase<Formatter.Builder>
        Parameters:
        apiPoint - api point object
      • preloadExtension

        protected void preloadExtension​(@NotNull
                                        @NotNull Extension extension)
        Description copied from class: BuilderBase
        Preload operation for extension, perform any data config and other operation needed for loading extension
        Specified by:
        preloadExtension in class BuilderBase<Formatter.Builder>
        Parameters:
        extension - to preload
      • loadExtension

        protected boolean loadExtension​(@NotNull
                                        @NotNull Extension extension)
        Description copied from class: BuilderBase
        Load extension if it is valid
        Specified by:
        loadExtension in class BuilderBase<Formatter.Builder>
        Parameters:
        extension - to load
        Returns:
        true if extension was loaded
      • nodeFormatterFactory

        public Formatter.Builder nodeFormatterFactory​(NodeFormatterFactory nodeFormatterFactory)
        Add a factory for instantiating a node renderer (done when rendering). This allows to override the rendering of node types or define rendering for custom node types.

        If multiple node renderers for the same node type are created, the one from the factory that was added first "wins". (This is how the rendering for core node types can be overridden; the default rendering comes last.)

        Parameters:
        nodeFormatterFactory - the factory for creating a node renderer
        Returns:
        this
      • htmlIdGeneratorFactory

        @NotNull
        public @NotNull Formatter.Builder htmlIdGeneratorFactory​(@NotNull
                                                                 @NotNull HeaderIdGeneratorFactory htmlIdGeneratorFactory)
        Add a factory for generating the header id attribute from the header's text
        Parameters:
        htmlIdGeneratorFactory - the factory for generating header tag id attributes
        Returns:
        this
      • linkResolverFactory

        @NotNull
        public @NotNull Formatter.Builder linkResolverFactory​(@NotNull
                                                              @NotNull LinkResolverFactory linkResolverFactory)
        Add a factory for instantiating a node renderer (done when rendering). This allows to override the rendering of node types or define rendering for custom node types.

        If multiple node renderers for the same node type are created, the one from the factory that was added first "wins". (This is how the rendering for core node types can be overridden; the default rendering comes last.)

        Parameters:
        linkResolverFactory - the factory for creating a node renderer
        Returns:
        this