Package com.devonfw.cobigen.cli.utils
Class ParsingUtils
- java.lang.Object
-
- com.devonfw.cobigen.cli.utils.ParsingUtils
-
public class ParsingUtils extends java.lang.ObjectThis 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 voidformatJavaSources(java.util.Set<java.nio.file.Path> generatedFiles)This method format the runtime generated code with the help of google APIstatic booleanparseRelativePath(java.util.List<java.nio.file.Path> inputFiles, java.nio.file.Path inputFile, int index)Tries to parse a relative path with the current working directory
-
-
-
Method Detail
-
parseRelativePath
public static boolean parseRelativePath(java.util.List<java.nio.file.Path> inputFiles, java.nio.file.Path inputFile, int index)Tries to parse a relative path with the current working directory- Parameters:
inputFiles- list of all input files from the userinputFile- input file which we are going to parse to find out whether it is a valid fileindex- 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.FormatterExceptionThis 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
-
-