Class JRubyAsciidoctor
- java.lang.Object
-
- org.asciidoctor.jruby.internal.JRubyAsciidoctor
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,Asciidoctor
,AsciidoctorJRuby
,LogHandler
public class JRubyAsciidoctor extends java.lang.Object implements AsciidoctorJRuby, LogHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.asciidoctor.jruby.AsciidoctorJRuby
AsciidoctorJRuby.Factory
-
-
Field Summary
Fields Modifier and Type Field Description protected RubyGemsPreloader
rubyGemsPreloader
protected org.jruby.Ruby
rubyRuntime
-
Constructor Summary
Constructors Constructor Description JRubyAsciidoctor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
asciidoctorVersion()
Method that gets the asciidoctor version which is being used..void
close()
void
convert(java.io.Reader contentReader, java.io.Writer rendererWriter, java.util.Map<java.lang.String,java.lang.Object> options)
Parse the document read from reader sending the converted result to writer.void
convert(java.io.Reader contentReader, java.io.Writer rendererWriter, Options options)
Parse the document read from reader sending the converted result to writer.void
convert(java.io.Reader contentReader, java.io.Writer rendererWriter, OptionsBuilder options)
Parse the document read from reader sending the converted result to writer.java.lang.String
convert(java.lang.String content, java.util.Map<java.lang.String,java.lang.Object> options)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.<T> T
convert(java.lang.String content, java.util.Map<java.lang.String,java.lang.Object> options, java.lang.Class<T> expectedResult)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.java.lang.String
convert(java.lang.String content, Options options)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.java.lang.String
convert(java.lang.String content, OptionsBuilder options)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.<T> T
convert(java.lang.String content, OptionsBuilder options, java.lang.Class<T> expectedResult)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.<T> T
convert(java.lang.String content, Options options, java.lang.Class<T> expectedResult)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.java.lang.String[]
convertDirectory(java.lang.Iterable<java.io.File> directoryWalker, java.util.Map<java.lang.String,java.lang.Object> options)
Convert all AsciiDoc files found in directoryWalker.java.lang.String[]
convertDirectory(java.lang.Iterable<java.io.File> directoryWalker, Options options)
Convert all AsciiDoc files found in directoryWalker.java.lang.String[]
convertDirectory(java.lang.Iterable<java.io.File> directoryWalker, OptionsBuilder options)
Convert all AsciiDoc files found in directoryWalker.java.lang.String
convertFile(java.io.File file, java.util.Map<java.lang.String,java.lang.Object> options)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.<T> T
convertFile(java.io.File file, java.util.Map<java.lang.String,java.lang.Object> options, java.lang.Class<T> expectedResult)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.java.lang.String
convertFile(java.io.File file, Options options)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.java.lang.String
convertFile(java.io.File file, OptionsBuilder options)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.<T> T
convertFile(java.io.File file, OptionsBuilder options, java.lang.Class<T> expectedResult)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.<T> T
convertFile(java.io.File file, Options options, java.lang.Class<T> expectedResult)
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.java.lang.String[]
convertFiles(java.util.Collection<java.io.File> files, java.util.Map<java.lang.String,java.lang.Object> options)
Convert all files from a collection.java.lang.String[]
convertFiles(java.util.Collection<java.io.File> asciidoctorFiles, Options options)
Convert all files from a collection.java.lang.String[]
convertFiles(java.util.Collection<java.io.File> files, OptionsBuilder options)
Convert all files from a collection.static JRubyAsciidoctor
create()
static JRubyAsciidoctor
create(java.lang.ClassLoader classloader)
static JRubyAsciidoctor
create(java.lang.ClassLoader classloader, java.lang.String gemPath)
static JRubyAsciidoctor
create(java.lang.String gemPath)
static JRubyAsciidoctor
create(java.util.List<java.lang.String> loadPaths)
static JRubyAsciidoctor
create(java.util.List<java.lang.String> loadPaths, java.lang.String gemPath)
ExtensionGroup
createGroup()
Creates an ExtensionGroup that can be used to register and unregister multiples extensions all at once.ExtensionGroup
createGroup(java.lang.String groupName)
Creates an ExtensionGroup that can be used to register and unregister multiples extensions all at once.org.jruby.Ruby
getRubyRuntime()
JavaConverterRegistry
javaConverterRegistry()
Creates a registry for registering Java converters.JavaExtensionRegistry
javaExtensionRegistry()
Creates an extension registry ready to be used for registering Java extensions.Document
load(java.lang.String content, java.util.Map<java.lang.String,java.lang.Object> options)
Loads AsciiDoc content and returns the Document object.Document
load(java.lang.String content, Options options)
Loads AsciiDoc content and returns the Document object.Document
loadFile(java.io.File file, java.util.Map<java.lang.String,java.lang.Object> options)
Loads AsciiDoc content from file and returns the Document object.Document
loadFile(java.io.File file, Options options)
Loads AsciiDoc content from file and returns the Document object.void
log(LogRecord logRecord)
Process a log record.DocumentHeader
readDocumentHeader(java.io.File file)
Reads only header parameters instead of all document.DocumentHeader
readDocumentHeader(java.io.Reader contentReader)
Reads only header parameters instead of all document.DocumentHeader
readDocumentHeader(java.lang.String content)
Reads only header parameters instead of all document.void
registerLogHandler(LogHandler logHandler)
Register aLogHandler
to capture Asciidoctor message records.void
requireLibraries(java.util.Collection<java.lang.String> libraries)
Loads the given Ruby gem in requiredLibraries by name.void
requireLibrary(java.lang.String... library)
Loads the given Ruby gem(s) by name.RubyExtensionRegistry
rubyExtensionRegistry()
Creates an Ruby extension registry ready to be used for registering Ruby extension.void
shutdown()
This method frees all resources consumed by AsciidoctorJ module.SyntaxHighlighterRegistry
syntaxHighlighterRegistry()
Creates a registry for registering Java syntax highlighter.void
unregisterAllExtensions()
Unregister all registered extensions.void
unregisterLogHandler(LogHandler logHandler)
Unregister aLogHandler
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.asciidoctor.Asciidoctor
unwrap
-
-
-
-
Field Detail
-
rubyGemsPreloader
protected RubyGemsPreloader rubyGemsPreloader
-
rubyRuntime
protected org.jruby.Ruby rubyRuntime
-
-
Method Detail
-
create
public static JRubyAsciidoctor create()
-
create
public static JRubyAsciidoctor create(java.lang.String gemPath)
-
create
public static JRubyAsciidoctor create(java.util.List<java.lang.String> loadPaths)
-
create
public static JRubyAsciidoctor create(java.lang.ClassLoader classloader)
-
create
public static JRubyAsciidoctor create(java.lang.ClassLoader classloader, java.lang.String gemPath)
-
create
public static JRubyAsciidoctor create(java.util.List<java.lang.String> loadPaths, java.lang.String gemPath)
-
close
public void close()
- Specified by:
close
in interfaceAsciidoctor
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
registerLogHandler
public void registerLogHandler(LogHandler logHandler)
Description copied from interface:Asciidoctor
Register aLogHandler
to capture Asciidoctor message records.- Specified by:
registerLogHandler
in interfaceAsciidoctor
- Parameters:
logHandler
- handler instance.
-
unregisterLogHandler
public void unregisterLogHandler(LogHandler logHandler)
Description copied from interface:Asciidoctor
Unregister aLogHandler
.- Specified by:
unregisterLogHandler
in interfaceAsciidoctor
- Parameters:
logHandler
- handler instance.
-
getRubyRuntime
public org.jruby.Ruby getRubyRuntime()
-
readDocumentHeader
public DocumentHeader readDocumentHeader(java.io.File file)
Description copied from interface:Asciidoctor
Reads only header parameters instead of all document.- Specified by:
readDocumentHeader
in interfaceAsciidoctor
- Parameters:
file
- to read the attributes.- Returns:
- header.
-
readDocumentHeader
public DocumentHeader readDocumentHeader(java.lang.String content)
Description copied from interface:Asciidoctor
Reads only header parameters instead of all document.- Specified by:
readDocumentHeader
in interfaceAsciidoctor
- Parameters:
content
- where converted content is written. Writer is flushed, but not closed.- Returns:
- header.
-
readDocumentHeader
public DocumentHeader readDocumentHeader(java.io.Reader contentReader)
Description copied from interface:Asciidoctor
Reads only header parameters instead of all document.- Specified by:
readDocumentHeader
in interfaceAsciidoctor
- Parameters:
contentReader
- where asciidoc content is read.- Returns:
- header.
-
requireLibrary
public void requireLibrary(java.lang.String... library)
Description copied from interface:Asciidoctor
Loads the given Ruby gem(s) by name.- Specified by:
requireLibrary
in interfaceAsciidoctor
-
requireLibraries
public void requireLibraries(java.util.Collection<java.lang.String> libraries)
Description copied from interface:Asciidoctor
Loads the given Ruby gem in requiredLibraries by name.- Specified by:
requireLibraries
in interfaceAsciidoctor
-
javaExtensionRegistry
public JavaExtensionRegistry javaExtensionRegistry()
Description copied from interface:Asciidoctor
Creates an extension registry ready to be used for registering Java extensions.- Specified by:
javaExtensionRegistry
in interfaceAsciidoctor
- Returns:
- Extension Registry object.
-
rubyExtensionRegistry
public RubyExtensionRegistry rubyExtensionRegistry()
Description copied from interface:Asciidoctor
Creates an Ruby extension registry ready to be used for registering Ruby extension.- Specified by:
rubyExtensionRegistry
in interfaceAsciidoctor
- Returns:
- Extension Registry object.
-
javaConverterRegistry
public JavaConverterRegistry javaConverterRegistry()
Description copied from interface:Asciidoctor
Creates a registry for registering Java converters.- Specified by:
javaConverterRegistry
in interfaceAsciidoctor
- Returns:
- Converter Registry object.
-
syntaxHighlighterRegistry
public SyntaxHighlighterRegistry syntaxHighlighterRegistry()
Description copied from interface:Asciidoctor
Creates a registry for registering Java syntax highlighter.This API is experimental and might change in an incompatible way in a minor version update!
- Specified by:
syntaxHighlighterRegistry
in interfaceAsciidoctor
- Returns:
- Converter Registry object.
-
unregisterAllExtensions
public void unregisterAllExtensions()
Description copied from interface:Asciidoctor
Unregister all registered extensions.- Specified by:
unregisterAllExtensions
in interfaceAsciidoctor
-
shutdown
public void shutdown()
Description copied from interface:Asciidoctor
This method frees all resources consumed by AsciidoctorJ module. Keep in mind that if this method is called, instance becomes unusable and you should create another instance.- Specified by:
shutdown
in interfaceAsciidoctor
-
asciidoctorVersion
public java.lang.String asciidoctorVersion()
Description copied from interface:Asciidoctor
Method that gets the asciidoctor version which is being used..- Specified by:
asciidoctorVersion
in interfaceAsciidoctor
- Returns:
- Version number.
-
convert
public java.lang.String convert(java.lang.String content, java.util.Map<java.lang.String,java.lang.Object> options)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as String object.
- Specified by:
convert
in interfaceAsciidoctor
- Parameters:
content
- the AsciiDoc source as String.options
- a Map of options to control processing (default: {}).- Returns:
- the rendered output String is returned
-
convert
public <T> T convert(java.lang.String content, java.util.Map<java.lang.String,java.lang.Object> options, java.lang.Class<T> expectedResult)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as String object.
- Specified by:
convert
in interfaceAsciidoctor
- Parameters:
content
- the AsciiDoc source as String.options
- a Map of options to control processing (default: {}).expectedResult
- the expected return type. UsuallyString
for HTML based formats. In this caseAsciidoctor.convert(String, Map)
is the same.- Returns:
- the rendered output String is returned
-
convert
public java.lang.String convert(java.lang.String content, Options options)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as String object.
- Specified by:
convert
in interfaceAsciidoctor
- Parameters:
content
- the AsciiDoc source as String.options
- options to control processing (default: empty).- Returns:
- the rendered output String is returned
-
convert
public <T> T convert(java.lang.String content, Options options, java.lang.Class<T> expectedResult)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as String object.
- Specified by:
convert
in interfaceAsciidoctor
- Parameters:
content
- the AsciiDoc source as String.options
- options to control processing (default: empty).expectedResult
- the expected return type. UsuallyString
for HTML based formats. In this caseAsciidoctor.convert(String, Options)
is the same.- Returns:
- the rendered output String is returned
-
convert
public java.lang.String convert(java.lang.String content, OptionsBuilder options)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as String object.
- Specified by:
convert
in interfaceAsciidoctor
- Parameters:
content
- the AsciiDoc source as String.options
- a Map of options to control processing (default: {}).- Returns:
- the rendered output String is returned
-
convert
public <T> T convert(java.lang.String content, OptionsBuilder options, java.lang.Class<T> expectedResult)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as String object.
- Specified by:
convert
in interfaceAsciidoctor
- Parameters:
content
- the AsciiDoc source as String.options
- a Map of options to control processing (default: {}).expectedResult
- the expected return type. UsuallyString
for HTML based formats. In this caseAsciidoctor.convert(String, OptionsBuilder)
is the same.- Returns:
- the rendered output String is returned
-
convert
public void convert(java.io.Reader contentReader, java.io.Writer rendererWriter, java.util.Map<java.lang.String,java.lang.Object> options) throws java.io.IOException
Description copied from interface:Asciidoctor
Parse the document read from reader sending the converted result to writer.- Specified by:
convert
in interfaceAsciidoctor
- Parameters:
contentReader
- where asciidoc content is read.rendererWriter
- where rendered content is written. Writer is flushed, but not closed.options
- a Map of options to control processing (default: {}).- Throws:
java.io.IOException
- if an error occurs while writing rendered content, this exception is thrown.
-
convert
public void convert(java.io.Reader contentReader, java.io.Writer rendererWriter, Options options) throws java.io.IOException
Description copied from interface:Asciidoctor
Parse the document read from reader sending the converted result to writer.- Specified by:
convert
in interfaceAsciidoctor
- Parameters:
contentReader
- where asciidoc content is read.rendererWriter
- where rendered content is written. Writer is flushed, but not closed.options
- options to control processing (default: empty).- Throws:
java.io.IOException
- if an error occurs while writing rendered content, this exception is thrown.
-
convert
public void convert(java.io.Reader contentReader, java.io.Writer rendererWriter, OptionsBuilder options) throws java.io.IOException
Description copied from interface:Asciidoctor
Parse the document read from reader sending the converted result to writer.- Specified by:
convert
in interfaceAsciidoctor
- Parameters:
contentReader
- where asciidoc content is read.rendererWriter
- where rendered content is written. Writer is flushed, but not closed.options
- a Map of options to control processing (default: {}).- Throws:
java.io.IOException
- if an error occurs while writing rendered content, this exception is thrown.
-
convertFile
public java.lang.String convertFile(java.io.File file, java.util.Map<java.lang.String,java.lang.Object> options)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as File.
If the :in_place option is true, and the input is a File, the output is written to a file adjacent to the input file, having an extension that corresponds to the backend format. Otherwise, if the :to_file option is specified, the file is written to that file. If :to_file is not an absolute path, it is resolved relative to :to_dir, if given, otherwise the Document#base_dir. If the target directory does not exist, it will not be created unless the :mkdirs option is set to true. If the file cannot be written because the target directory does not exist, or because it falls outside of the Document#base_dir in safe mode, an IOError is raised.
- Specified by:
convertFile
in interfaceAsciidoctor
- Parameters:
file
- an input Asciidoctor file.options
- a Map of options to control processing (default: {}).- Returns:
- returns nothing if the rendered output String is written to a file.
-
convertFile
public <T> T convertFile(java.io.File file, java.util.Map<java.lang.String,java.lang.Object> options, java.lang.Class<T> expectedResult)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as File.
If the :in_place option is true, and the input is a File, the output is written to a file adjacent to the input file, having an extension that corresponds to the backend format. Otherwise, if the :to_file option is specified, the file is written to that file. If :to_file is not an absolute path, it is resolved relative to :to_dir, if given, otherwise the Document#base_dir. If the target directory does not exist, it will not be created unless the :mkdirs option is set to true. If the file cannot be written because the target directory does not exist, or because it falls outside of the Document#base_dir in safe mode, an IOError is raised.
- Specified by:
convertFile
in interfaceAsciidoctor
- Parameters:
file
- an input Asciidoctor file.options
- a Map of options to control processing (default: {}).expectedResult
- the expected return type. UsuallyString
for HTML based formats. In this caseAsciidoctor.convertFile(File, Map)
is the same.- Returns:
- returns nothing if the rendered output is written to a file.
-
convertFile
public java.lang.String convertFile(java.io.File file, Options options)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as File.
If the :in_place option is true, and the input is a File, the output is written to a file adjacent to the input file, having an extension that corresponds to the backend format. Otherwise, if the :to_file option is specified, the file is written to that file. If :to_file is not an absolute path, it is resolved relative to :to_dir, if given, otherwise the Document#base_dir. If the target directory does not exist, it will not be created unless the :mkdirs option is set to true. If the file cannot be written because the target directory does not exist, or because it falls outside of the Document#base_dir in safe mode, an IOError is raised.
- Specified by:
convertFile
in interfaceAsciidoctor
- Parameters:
file
- an input Asciidoctor file.options
- options to control processing (default: empty).- Returns:
- returns nothing if the rendered output String is written to a file.
-
convertFile
public <T> T convertFile(java.io.File file, Options options, java.lang.Class<T> expectedResult)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as File.
If the :in_place option is true, and the input is a File, the output is written to a file adjacent to the input file, having an extension that corresponds to the backend format. Otherwise, if the :to_file option is specified, the file is written to that file. If :to_file is not an absolute path, it is resolved relative to :to_dir, if given, otherwise the Document#base_dir. If the target directory does not exist, it will not be created unless the :mkdirs option is set to true. If the file cannot be written because the target directory does not exist, or because it falls outside of the Document#base_dir in safe mode, an IOError is raised.
- Specified by:
convertFile
in interfaceAsciidoctor
- Parameters:
file
- an input Asciidoctor file.options
- options to control processing (default: empty).expectedResult
- the expected return type. UsuallyString
for HTML based formats. In this caseAsciidoctor.convertFile(File, Map)
is the same.- Returns:
- returns nothing if the rendered output is written to a file.
-
convertFile
public java.lang.String convertFile(java.io.File file, OptionsBuilder options)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as File.
If the :in_place option is true, and the input is a File, the output is written to a file adjacent to the input file, having an extension that corresponds to the backend format. Otherwise, if the :to_file option is specified, the file is written to that file. If :to_file is not an absolute path, it is resolved relative to :to_dir, if given, otherwise the Document#base_dir. If the target directory does not exist, it will not be created unless the :mkdirs option is set to true. If the file cannot be written because the target directory does not exist, or because it falls outside of the Document#base_dir in safe mode, an IOError is raised.
- Specified by:
convertFile
in interfaceAsciidoctor
- Parameters:
file
- an input Asciidoctor file.options
- a Map of options to control processing (default: {}).- Returns:
- returns nothing if the rendered output String is written to a file.
-
convertFile
public <T> T convertFile(java.io.File file, OptionsBuilder options, java.lang.Class<T> expectedResult)
Description copied from interface:Asciidoctor
Parse the AsciiDoc source input into an DocumentDocument
and convert it to the specified backend format.Accepts input as File.
If the :in_place option is true, and the input is a File, the output is written to a file adjacent to the input file, having an extension that corresponds to the backend format. Otherwise, if the :to_file option is specified, the file is written to that file. If :to_file is not an absolute path, it is resolved relative to :to_dir, if given, otherwise the Document#base_dir. If the target directory does not exist, it will not be created unless the :mkdirs option is set to true. If the file cannot be written because the target directory does not exist, or because it falls outside of the Document#base_dir in safe mode, an IOError is raised.
- Specified by:
convertFile
in interfaceAsciidoctor
- Parameters:
file
- an input Asciidoctor file.options
- a Map of options to control processing (default: {}).expectedResult
- the expected return type. UsuallyString
for HTML based formats. In this caseAsciidoctor.convertFile(File, Map)
is the same.- Returns:
- returns nothing if the rendered output is written to a file.
-
convertDirectory
public java.lang.String[] convertDirectory(java.lang.Iterable<java.io.File> directoryWalker, java.util.Map<java.lang.String,java.lang.Object> options)
Description copied from interface:Asciidoctor
Convert all AsciiDoc files found in directoryWalker. SeeAsciiDocDirectoryWalker
for reference strategy.- Specified by:
convertDirectory
in interfaceAsciidoctor
- Parameters:
directoryWalker
- strategy used to retrieve all files to be rendered.options
- a Map of options to control processing (default: {}).- Returns:
- returns an array of 0 positions if the rendered output is written to a file.
-
convertDirectory
public java.lang.String[] convertDirectory(java.lang.Iterable<java.io.File> directoryWalker, Options options)
Description copied from interface:Asciidoctor
Convert all AsciiDoc files found in directoryWalker. SeeAsciiDocDirectoryWalker
for reference strategy.- Specified by:
convertDirectory
in interfaceAsciidoctor
- Parameters:
directoryWalker
- strategy used to retrieve all files to be rendered.options
- options to control processing (default: empty).- Returns:
- returns an array of 0 positions if the rendered output is written to a file.
-
convertDirectory
public java.lang.String[] convertDirectory(java.lang.Iterable<java.io.File> directoryWalker, OptionsBuilder options)
Description copied from interface:Asciidoctor
Convert all AsciiDoc files found in directoryWalker. SeeAsciiDocDirectoryWalker
for reference strategy.- Specified by:
convertDirectory
in interfaceAsciidoctor
- Parameters:
directoryWalker
- strategy used to retrieve all files to be rendered.options
- a Map of options to control processing (default: {}).- Returns:
- returns an array of 0 positions if the rendered output is written to a file.
-
convertFiles
public java.lang.String[] convertFiles(java.util.Collection<java.io.File> files, java.util.Map<java.lang.String,java.lang.Object> options)
Description copied from interface:Asciidoctor
Convert all files from a collection.- Specified by:
convertFiles
in interfaceAsciidoctor
- Parameters:
files
- to be converted.options
- a Map of options to control processing (default: {}).- Returns:
- returns an array of 0 positions if the rendered output is written to a file.
-
convertFiles
public java.lang.String[] convertFiles(java.util.Collection<java.io.File> asciidoctorFiles, Options options)
Description copied from interface:Asciidoctor
Convert all files from a collection.- Specified by:
convertFiles
in interfaceAsciidoctor
- Parameters:
asciidoctorFiles
- to be converted.options
- options to control processing (default: empty).- Returns:
- returns an array of 0 positions if the rendered output is written to a file.
-
convertFiles
public java.lang.String[] convertFiles(java.util.Collection<java.io.File> files, OptionsBuilder options)
Description copied from interface:Asciidoctor
Convert all files from a collection.- Specified by:
convertFiles
in interfaceAsciidoctor
- Parameters:
files
- to be converted.options
- a Map of options to control processing (default: {}).- Returns:
- returns an array of 0 positions if the rendered output is written to a file.
-
load
public Document load(java.lang.String content, java.util.Map<java.lang.String,java.lang.Object> options)
Description copied from interface:Asciidoctor
Loads AsciiDoc content and returns the Document object.- Specified by:
load
in interfaceAsciidoctor
- Parameters:
content
- to be parsed.options
- a Map of options to control processing (default: {}).- Returns:
- Document of given content.
-
load
public Document load(java.lang.String content, Options options)
Description copied from interface:Asciidoctor
Loads AsciiDoc content and returns the Document object.- Specified by:
load
in interfaceAsciidoctor
- Parameters:
content
- to be parsed.options
- options to control processing (default: empty).- Returns:
- Document of given content.
-
loadFile
public Document loadFile(java.io.File file, java.util.Map<java.lang.String,java.lang.Object> options)
Description copied from interface:Asciidoctor
Loads AsciiDoc content from file and returns the Document object.- Specified by:
loadFile
in interfaceAsciidoctor
- Parameters:
file
- to be parsed.options
- a Map of options to control processing (default: {}).- Returns:
- Document of given content.
-
loadFile
public Document loadFile(java.io.File file, Options options)
Description copied from interface:Asciidoctor
Loads AsciiDoc content from file and returns the Document object.- Specified by:
loadFile
in interfaceAsciidoctor
- Parameters:
file
- to be parsed.options
- options to control processing (default: empty).- Returns:
- Document of given content.
-
createGroup
public ExtensionGroup createGroup()
Description copied from interface:Asciidoctor
Creates an ExtensionGroup that can be used to register and unregister multiples extensions all at once.- Specified by:
createGroup
in interfaceAsciidoctor
- Returns:
- Extension Group instance.
-
createGroup
public ExtensionGroup createGroup(java.lang.String groupName)
Description copied from interface:Asciidoctor
Creates an ExtensionGroup that can be used to register and unregister multiples extensions all at once.- Specified by:
createGroup
in interfaceAsciidoctor
- Parameters:
groupName
- to assign to the ExtensionGroup.- Returns:
- Extension Group instance.
-
log
public void log(LogRecord logRecord)
Description copied from interface:LogHandler
Process a log record. This method is called during conversion and will abort completely if an exception is thrown from within.- Specified by:
log
in interfaceLogHandler
-
-