Klasse ParserRegistry

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

public class ParserRegistry extends Object
Provides a registry for all available parsers.
Autor:
Lorenz Munsch
  • Konstruktordetails

    • ParserRegistry

      public ParserRegistry()
      Creates a new registry instance.
  • Methodendetails

    • getIds

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

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

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

      public ParserDescriptor get(String id)
      Returns the ParserDescriptor with the specified ID.
      Parameter:
      id - the ID of the parser
      Gibt zurück:
      the requested descriptor
      Löst aus:
      NoSuchElementException - if no such parser exists
    • getAllDescriptors

      public List<ParserDescriptor> getAllDescriptors()
      Returns all descriptors.
      Gibt zurück:
      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.
      Parameter:
      unused - not used
      Löst aus:
      IOException - of the file `SUPPORTED-FORMATS.md` cannot be written locally