Package org.asciidoctor.converter
Class AbstractConverter<T>
java.lang.Object
org.asciidoctor.converter.AbstractConverter<T>
- Type Parameters:
T- The type of result this converter produces, e.g.String.
- All Implemented Interfaces:
Converter<T>,OutputFormatWriter<T>,Logging,LogHandler
- Direct Known Subclasses:
StringConverter
public abstract class AbstractConverter<T>
extends Object
implements Converter<T>, OutputFormatWriter<T>, Logging, LogHandler
An abstract base class for Java based converters.
Instead of directly implementing
Converter Java converters should extend this class.
For converters producing string output consider extending the StringConverter class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidProcess a log record.voidsetLogHandler(LogHandler logHandler) voidsetOutfileSuffix(String outfilesuffix) To change the extension of the generated file invoke this method in the constructor of the converter implementation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.asciidoctor.converter.OutputFormatWriter
write
-
Constructor Details
-
AbstractConverter
-
-
Method Details
-
getOptions
- Specified by:
getOptionsin interfaceConverter<T>
-
getBackend
-
getOutfileSuffix
- Specified by:
getOutfileSuffixin interfaceConverter<T>- Returns:
- The file extension of the generated files.
-
setOutfileSuffix
Description copied from interface:ConverterTo change the extension of the generated file invoke this method in the constructor of the converter implementation. The default extension is.html.- Specified by:
setOutfileSuffixin interfaceConverter<T>- Parameters:
outfilesuffix- The file extension for the generated file, e.g..txt
-
log
Description copied from interface:LogHandlerProcess a log record. This method is called during conversion and will abort completely if an exception is thrown from within.- Specified by:
login interfaceLogHandler
-
setLogHandler
- Specified by:
setLogHandlerin interfaceLogging
-