public abstract class MainClassFinder
extends java.lang.Object
public static main method by performing a breadth first
search.| Modifier and Type | Class | Description |
|---|---|---|
static interface |
MainClassFinder.ClassNameCallback<T> |
Callback interface used to receive class names.
|
| Constructor | Description |
|---|---|
MainClassFinder() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
findMainClass(java.io.File rootFolder) |
Find the main class from a given folder.
|
static java.lang.String |
findMainClass(java.util.jar.JarFile jarFile,
java.lang.String classesLocation) |
Find the main class in a given jar file.
|
static java.lang.String |
findSingleMainClass(java.io.File rootFolder) |
Find a single main class from a given folder.
|
static java.lang.String |
findSingleMainClass(java.util.jar.JarFile jarFile,
java.lang.String classesLocation) |
Find a single main class in a given jar file.
|
public static java.lang.String findMainClass(java.io.File rootFolder)
throws java.io.IOException
rootFolder - the root folder to searchnulljava.io.IOException - if the folder cannot be readpublic static java.lang.String findSingleMainClass(java.io.File rootFolder)
throws java.io.IOException
rootFolder - the root folder to searchnulljava.io.IOException - if the folder cannot be readpublic static java.lang.String findMainClass(java.util.jar.JarFile jarFile,
java.lang.String classesLocation)
throws java.io.IOException
jarFile - the jar file to searchclassesLocation - the location within the jar containing classesnulljava.io.IOException - if the jar file cannot be readpublic static java.lang.String findSingleMainClass(java.util.jar.JarFile jarFile,
java.lang.String classesLocation)
throws java.io.IOException
jarFile - the jar file to searchclassesLocation - the location within the jar containing classesnulljava.io.IOException - if the jar file cannot be readCopyright © 2018. All rights reserved.