Closed johnaohara closed 1 year ago
The thought process for making it static was for reducing memory footprint. Seeing as no state is maintained in Parser wrt the document being parsed, the parsing definitions could be shared between Runs
. Tbf idk if Yaml
maintains state, so probably safer to have a new instance of Parser
for each run
Is there a supported API for qDup defined anywhere?
We should not change to a static instance. A shared
Parser
forces allRuns
in the jvm to support any custom commands or yaml loaded into theParser
. This would limit the re-usability of qDup as a library. I didn't think theQDup
class was part of the supported public interface for qDup. If we want to make it more re-usable then perhaps we make theParser
a private member variable with getters and setters?