Package run.halo.gradle.utils
Class MainClassFinder
java.lang.Object
run.halo.gradle.utils.MainClassFinder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringfindSingleMainClass(File rootDirectory, String superClassName) Find a single main class from the givenrootDirectory.
-
Constructor Details
-
MainClassFinder
public MainClassFinder()
-
-
Method Details
-
findSingleMainClass
public static String findSingleMainClass(File rootDirectory, String superClassName) throws IOException Find a single main class from the givenrootDirectory. A main class extends the givensuperClassNamewill be returned.- Parameters:
rootDirectory- the root directory to searchsuperClassName- the subclass extends the super class is present main-class class- Returns:
- the main class or
null - Throws:
IOException- if the directory cannot be read
-