Class GenerationReport
java.lang.Object
com.arc_e_tect.gradle.apionly.transcriberj.core.GenerationReport
What a generation run could not do in full, and what the specification could do
about it: the end-of-run report D14 asks for.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA generated method that throws instead of doing its work.static final recordA generated method that throws because no valid value could be generated for it: none exists, this generator cannot find one, or it reaches a construct no rule represents yet.static final recordSomething the specification could do better, and how.static final recordA parameter no valid value is generated for yet. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(GenerationReport emitter) Adds what one emitter reported -- the methods it degraded -- after everything already here, as a run of every emitter in one pass would have.How many constraints on request input have a case, and how many have none, by reason.degraded()Every degraded method.fragment()The report as a fragment one generation task writes, as JSON: whatrender(java.lang.String, java.lang.String)shows, and nothing else, so that a task that runs one emitter writes only that emitter's part.static GenerationReportfromFragment(String json) Reads a fragmentfragment()wrote.gaps()The operations that constrain their request input but declare no invalid-request status.intHow many invalid-request cases were derived.voidRecords something worth saying about this generation that is not a problem.notes()What this generation had to say about itself.Every generated method that throws because no valid value could be generated for it.Every recommendation.The report as text, for a file and a build log.renderAsciiDoc(String title) The report's findings as an AsciiDoc fragment, included by the framerenderAsciiDocFrame(java.lang.String, java.lang.String, java.util.List<java.lang.String>)writes: one section per kind of finding that has any, each finding shown verbatim, so that nothing a contract says is read as AsciiDoc markup.renderAsciiDocFrame(String contract, String version, List<String> fragments) The frame of the AsciiDoc report: the summary of the whole report, and aninclude::of each fragment, in the order given.renderValidValues(String contract, String version) Every generated valid value, by class and location, as JSON: members sorted by name, no insignificant whitespace, and a final newline, so the same contract gives the same bytes.Every construct no generation rule has been decided for.Every parameter no valid value is generated for yet.warnings()Everything about the contract's design worth a second look.
-
Constructor Details
-
GenerationReport
public GenerationReport()Creates an empty report.
-
-
Method Details
-
noValidValue
Every generated method that throws because no valid value could be generated for it.- Returns:
- the entries, in the order they were written
-
unsupportedParameters
Every parameter no valid value is generated for yet.- Returns:
- the entries, in contract order
-
invalidRequestCases
public int invalidRequestCases()How many invalid-request cases were derived.- Returns:
- the count
-
constraintCoverage
How many constraints on request input have a case, and how many have none, by reason.- Returns:
- the counts:
covered, then each reason's label, in order of first use
-
gaps
The operations that constrain their request input but declare no invalid-request status.- Returns:
- their locations, in contract order
-
degraded
Every degraded method.- Returns:
- the entries, in the order they were written
-
recommendations
Every recommendation.- Returns:
- the entries, in the order they were made
-
undecided
Every construct no generation rule has been decided for.- Returns:
- the findings, in contract order
-
warnings
Everything about the contract's design worth a second look.- Returns:
- the warnings, in the order they were found
-
note
Records something worth saying about this generation that is not a problem.- Parameters:
note- the note
-
notes
What this generation had to say about itself.- Returns:
- the notes, in the order they were made
-
render
The report as text, for a file and a build log.- Parameters:
contract- the contract's nameversion- the contract's version- Returns:
- the text
-
renderValidValues
Every generated valid value, by class and location, as JSON: members sorted by name, no insignificant whitespace, and a final newline, so the same contract gives the same bytes.- Parameters:
contract- the contract's nameversion- the contract's version- Returns:
- the JSON text
-
fragment
The report as a fragment one generation task writes, as JSON: whatrender(java.lang.String, java.lang.String)shows, and nothing else, so that a task that runs one emitter writes only that emitter's part.fromFragment(java.lang.String)reads it back.- Returns:
- the JSON text, with a final newline
-
fromFragment
Reads a fragmentfragment()wrote.- Parameters:
json- the fragment- Returns:
- the report it holds
-
add
Adds what one emitter reported -- the methods it degraded -- after everything already here, as a run of every emitter in one pass would have.- Parameters:
emitter- the emitter's part of a report
-
renderAsciiDoc
The report's findings as an AsciiDoc fragment, included by the framerenderAsciiDocFrame(java.lang.String, java.lang.String, java.util.List<java.lang.String>)writes: one section per kind of finding that has any, each finding shown verbatim, so that nothing a contract says is read as AsciiDoc markup.- Parameters:
title- the fragment's heading, such asCoreorEmitter restdocs- Returns:
- the AsciiDoc text
-
renderAsciiDocFrame
The frame of the AsciiDoc report: the summary of the whole report, and aninclude::of each fragment, in the order given.- Parameters:
contract- the contract's nameversion- the contract's versionfragments- each fragment's path, relative to the frame- Returns:
- the AsciiDoc text
-