Class ParserRegistry

java.lang.Object
edu.hm.hafner.analysis.registry.ParserRegistry

public class ParserRegistry extends Object
Provides a ParserRegistry that returns a map for all available Parsers.
Author:
Lorenz Munsch
  • Constructor Details

    • ParserRegistry

      public ParserRegistry()
      Creates a new registry instance.
  • Method Details

    • getIds

      public Set<String> getIds()
      Returns the IDs of all available parsers.
      Returns:
      a set of all IDs
    • getNames

      public Set<String> getNames()
      Returns the names of all available parsers.
      Returns:
      a set of all names
    • contains

      public boolean contains(String id)
      Returns whether a parser with the specified ID exists.
      Parameters:
      id - the ID to check
      Returns:
      true if the parser exists, false otherwise
    • get

      public ParserDescriptor get(String id)
      Returns the ParserDescriptor with the specified ID.
      Parameters:
      id - the ID of the parser
      Returns:
      the requested descriptor
      Throws:
      NoSuchElementException - if no such parser exists
    • getAllDescriptors

      public List<ParserDescriptor> getAllDescriptors()
      Returns all descriptors.
      Returns:
      all supported descriptors
    • main

      public static void main(String[] unused) throws IOException
      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