public abstract class MainClassFinder extends Object
public static main method by performing a breadth first
search.| Modifier and Type | Class and Description |
|---|---|
static interface |
MainClassFinder.ClassNameCallback<T>
Callback interface used to receive class names.
|
| Constructor and Description |
|---|
MainClassFinder() |
| Modifier and Type | Method and Description |
|---|---|
static String |
findMainClass(File rootFolder)
Find the main class from a given folder.
|
static String |
findMainClass(JarFile jarFile,
String classesLocation)
Find the main class in a given jar file.
|
static String |
findSingleMainClass(File rootFolder)
Find a single main class from a given folder.
|
static String |
findSingleMainClass(JarFile jarFile,
String classesLocation)
Find a single main class in a given jar file.
|
public static String findMainClass(File rootFolder) throws IOException
rootFolder - the root folder to searchnullIOExceptionpublic static String findSingleMainClass(File rootFolder) throws IOException
rootFolder - the root folder to searchnullIOExceptionpublic static String findMainClass(JarFile jarFile, String classesLocation) throws IOException
jarFile - the jar file to searchclassesLocation - the location within the jar containing classesnullIOExceptionpublic static String findSingleMainClass(JarFile jarFile, String classesLocation) throws IOException
jarFile - the jar file to searchclassesLocation - the location within the jar containing classesnullIOExceptionCopyright © 2014 Pivotal Software, Inc.. All rights reserved.