Class AbstractFileParser

    • Field Detail

      • acceptKeyPattern

        protected final Pattern acceptKeyPattern
    • Constructor Detail

      • AbstractFileParser

        protected AbstractFileParser​(org.apache.maven.plugin.logging.Log log,
                                     String encoding,
                                     org.nuiton.io.SortedProperties oldParser,
                                     Pattern acceptKeyPattern,
                                     boolean showTouchedFiles)
    • Method Detail

      • isShowTouchedFiles

        public boolean isShowTouchedFiles()
      • isTouched

        public boolean isTouched()
        Specified by:
        isTouched in interface FileParser
        Returns:
        true if file was touched (says contains at least one i18n key)
      • getResult

        public org.nuiton.io.SortedProperties getResult()
        Description copied from interface: FileParser
        TODO As we do not used anylonger old language, we should directly TODO use only a set of keys, no need to keep i18n value...
        Specified by:
        getResult in interface FileParser
        Returns:
        the results of i18n keys found for the given file
      • getEncoding

        public String getEncoding()
        Description copied from interface: FileParser
        Gets encoding used to read and write files.
        Specified by:
        getEncoding in interface FileParser
        Returns:
        the encoding
      • destroy

        public void destroy()
        Description copied from interface: FileParser
        clean file parser.
        Specified by:
        destroy in interface FileParser
      • getLog

        public org.apache.maven.plugin.logging.Log getLog()
      • registerKey

        protected void registerKey​(String key)
        Method to invoke when a i18n key was detected .
        Parameters:
        key - the i18n key to register
      • setTouched

        protected void setTouched​(boolean touched)
      • prepareFile

        protected File prepareFile​(File file)
                            throws IOException
        To prepare the file (if any thing to be done before scanning it). By default do nothing, use directly the input file.
        Parameters:
        file - the incoming file
        Returns:
        the real file to process
        Throws:
        IOException - if any IO problem while preparing file
        Since:
        2.1