java.lang.Object
edu.hm.hafner.analysis.registry.ParserRegistry
Provides a registry for all available
parsers.- Author:
- Lorenz Munsch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether a parser with the specified ID exists.Returns theParserDescriptorwith the specified ID.Returns all descriptors.getIds()Returns the IDs of all available parsers.getNames()Returns the names of all available parsers.static voidUtility to create a report with all available descriptors.
-
Constructor Details
-
ParserRegistry
public ParserRegistry()Creates a new registry instance.
-
-
Method Details
-
getIds
Returns the IDs of all available parsers.- Returns:
- a set of all IDs
-
getNames
Returns the names of all available parsers.- Returns:
- a set of all names
-
contains
Returns whether a parser with the specified ID exists.- Parameters:
id- the ID to check- Returns:
trueif the parser exists,falseotherwise
-
get
Returns theParserDescriptorwith the specified ID.- Parameters:
id- the ID of the parser- Returns:
- the requested descriptor
- Throws:
NoSuchElementException- if no such parser exists
-
getAllDescriptors
Returns all descriptors.- Returns:
- all supported descriptors
-
main
Utility to create a report with all available descriptors. The report will be stored in the file "SUPPORTED-FORMATS.md" in the top level directory.- Parameters:
unused- not used- Throws:
IOException- of the file `SUPPORTED-FORMATS.md` cannot be written locally
-