Class AbstractParserModule

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String[] extensions
      The supported file extensions.
      private java.lang.String parserId
      The default file extension.
      private java.lang.String sourceDirectory
      The source directory.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        AbstractParserModule()
      Constructor with null.
        AbstractParserModule​(java.lang.String parserId)
      Constructor with same value for everything: source directory and file extension equal parserId.
        AbstractParserModule​(java.lang.String parserId, java.lang.String extension)
      Constructor with same value for parser id and source directory.
      protected AbstractParserModule​(java.lang.String sourceDirectory, java.lang.String extension, java.lang.String parserId)
      Deprecated.
      can cause confusion with constructor with multiple extensions
      protected AbstractParserModule​(java.lang.String sourceDirectory, java.lang.String parserId, java.lang.String... extensions)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] getExtensions()
      Returns the supported file extensions for a given module.
      java.lang.String getParserId()
      Returns the parser id for a given module.
      java.lang.String getSourceDirectory()
      Returns the directory that contains source files for a given module.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • sourceDirectory

        private final java.lang.String sourceDirectory
        The source directory.
      • extensions

        private final java.lang.String[] extensions
        The supported file extensions.
      • parserId

        private final java.lang.String parserId
        The default file extension.
    • Constructor Detail

      • AbstractParserModule

        public AbstractParserModule()
        Constructor with null.
      • AbstractParserModule

        public AbstractParserModule​(java.lang.String parserId)
        Constructor with same value for everything: source directory and file extension equal parserId.
        Parameters:
        parserId - the parser id
      • AbstractParserModule

        public AbstractParserModule​(java.lang.String parserId,
                                    java.lang.String extension)
        Constructor with same value for parser id and source directory.
        Parameters:
        parserId - the parser id
        extension - the file extension
      • AbstractParserModule

        protected AbstractParserModule​(java.lang.String sourceDirectory,
                                       java.lang.String extension,
                                       java.lang.String parserId)
        Deprecated.
        can cause confusion with constructor with multiple extensions
        Parameters:
        sourceDirectory - not null
        extension - not null
        parserId - not null
        Since:
        1.1.1
      • AbstractParserModule

        protected AbstractParserModule​(java.lang.String sourceDirectory,
                                       java.lang.String parserId,
                                       java.lang.String... extensions)
        Parameters:
        sourceDirectory - not null
        parserId - not null (usually equals sourceDirectory)
        extensions - not null
        Since:
        1.7
    • Method Detail

      • getSourceDirectory

        public java.lang.String getSourceDirectory()
        Returns the directory that contains source files for a given module.
        Specified by:
        getSourceDirectory in interface ParserModule
        Returns:
        The source directory.
      • getExtensions

        public java.lang.String[] getExtensions()
        Returns the supported file extensions for a given module.
        Specified by:
        getExtensions in interface ParserModule
        Returns:
        The supported file extensions.
      • getParserId

        public java.lang.String getParserId()
        Returns the parser id for a given module.
        Specified by:
        getParserId in interface ParserModule
        Returns:
        The parser id.