Class ParsingUtils


  • public class ParsingUtils
    extends java.lang.Object
    This class contains utilities for parsing user input. It also contains mmm logic to parse user's input file in order to find needed information
    • Constructor Summary

      Constructors 
      Constructor Description
      ParsingUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void formatJavaSources​(java.util.Set<java.nio.file.Path> generatedFiles)
      This method format the runtime generated code with the help of google API
      static boolean parseRelativePath​(java.util.List<java.io.File> inputFiles, java.io.File inputFile, int index)
      Tries to parse a relative path with the current working directory
      • Methods inherited from class java.lang.Object

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

      • ParsingUtils

        public ParsingUtils()
    • Method Detail

      • parseRelativePath

        public static boolean parseRelativePath​(java.util.List<java.io.File> inputFiles,
                                                java.io.File inputFile,
                                                int index)
        Tries to parse a relative path with the current working directory
        Parameters:
        inputFiles - list of all input files from the user
        inputFile - input file which we are going to parse to find out whether it is a valid file
        index - location of the input file in the ArrayList of inputs
        Returns:
        true only if the parsed file exists, false otherwise
      • formatJavaSources

        public static void formatJavaSources​(java.util.Set<java.nio.file.Path> generatedFiles)
                                      throws com.google.googlejavaformat.java.FormatterException
        This method format the runtime generated code with the help of google API
        Parameters:
        generatedFiles - List of generation report files
        Throws:
        com.google.googlejavaformat.java.FormatterException - if any error occurred while formatting the Java code