Package org.revapi.reporter.text
Class TextReporter
- java.lang.Object
-
- org.revapi.reporter.file.AbstractFileReporter
-
- org.revapi.reporter.text.TextReporter
-
- All Implemented Interfaces:
AutoCloseable,org.revapi.configuration.Configurable,org.revapi.Reporter
public class TextReporter extends org.revapi.reporter.file.AbstractFileReporter- Since:
- 0.1
- Author:
- Lukas Krejci
-
-
Constructor Summary
Constructors Constructor Description TextReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected freemarker.template.ConfigurationcreateFreeMarkerConfiguration()Creates a new FreeMarker configuration.protected voiddoReport(org.revapi.Report report)protected voidflushReports()StringgetExtensionId()ReadergetJSONSchema()voidinitialize(org.revapi.AnalysisContext analysis)protected voidsetOutput(PrintWriter wrt)
-
-
-
Method Detail
-
setOutput
protected void setOutput(PrintWriter wrt)
- Overrides:
setOutputin classorg.revapi.reporter.file.AbstractFileReporter
-
initialize
public void initialize(@Nonnull org.revapi.AnalysisContext analysis)
- Specified by:
initializein interfaceorg.revapi.configuration.Configurable- Overrides:
initializein classorg.revapi.reporter.file.AbstractFileReporter
-
createFreeMarkerConfiguration
protected freemarker.template.Configuration createFreeMarkerConfiguration()
Creates a new FreeMarker configuration. By default, it is configured as follows:- compatibility level is set to 2.3.23
- the object wrapper is configured to expose fields
- API builtins are enabled
- there are 2 template loaders - 1 for loading templates from /META-INF using a classloader and a second one to load templates from files.
- Returns:
-
doReport
protected void doReport(@Nonnull org.revapi.Report report)
- Specified by:
doReportin classorg.revapi.reporter.file.AbstractFileReporter
-
flushReports
protected void flushReports() throws IOException- Specified by:
flushReportsin classorg.revapi.reporter.file.AbstractFileReporter- Throws:
IOException
-
-