com.vaadin.copilot.
Class Util
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic File
getSinglePackage
(File javaSourceFolder) Finds the first folder inside the given folder that contains more than one sub-folder.
static String
increaseTrailingNumber
(String filename) Takes a filename and increases a trailing number on the name (excluding the extension).
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
increaseTrailingNumber
Takes a filename and increases a trailing number on the name (excluding the extension).
For example, "file1.txt" would return "file2.txt", "file.txt" would return "file1.txt" and "file123.txt" would return "file124.txt". If the filename doesn't end with a number, a 1 is added at the end.
Parameters:
filename
- the string to increaseReturns:
the input string with the trailing number increased by one, or with a 1 added at the end if it didn't end with a number
-
getSinglePackage
Finds the first folder inside the given folder that contains more than one sub-folder.
Parameters:
javaSourceFolder
- the root java source folderReturns:
the first folder that contains more than one sub-folder
-