public abstract class ExecutableArchiveLauncher extends Launcher
Launchers.| Modifier and Type | Field and Description |
|---|---|
protected static String |
BOOT_CLASSPATH_INDEX_ATTRIBUTE |
| Modifier | Constructor and Description |
|---|---|
|
ExecutableArchiveLauncher() |
protected |
ExecutableArchiveLauncher(Archive archive) |
| Modifier and Type | Method and Description |
|---|---|
protected ClassLoader |
createClassLoader(Iterator<Archive> archives)
Create a classloader for the specified archives.
|
protected Archive |
getArchive()
Return the root archive.
|
protected Iterator<Archive> |
getClassPathArchivesIterator()
Returns the archives that will be used to construct the class path.
|
protected org.springframework.boot.loader.ClassPathIndexFile |
getClassPathIndex(Archive archive) |
protected String |
getMainClass()
Returns the main class that should be launched.
|
protected boolean |
isExploded()
Returns if the launcher is running in an exploded mode.
|
protected abstract boolean |
isNestedArchive(Archive.Entry entry)
Determine if the specified entry is a nested item that should be added to the
classpath.
|
protected boolean |
isPostProcessingClassPathArchives()
Return if post processing needs to be applied to the archives.
|
protected boolean |
isSearchCandidate(Archive.Entry entry)
Determine if the specified entry is a candidate for further searching.
|
protected void |
postProcessClassPathArchives(List<Archive> archives)
Called to post-process archive entries before they are used.
|
createArchive, createClassLoader, createClassLoader, createMainMethodRunner, getClassPathArchives, launch, launchprotected static final String BOOT_CLASSPATH_INDEX_ATTRIBUTE
public ExecutableArchiveLauncher()
protected ExecutableArchiveLauncher(Archive archive)
protected org.springframework.boot.loader.ClassPathIndexFile getClassPathIndex(Archive archive) throws IOException
IOExceptionprotected String getMainClass() throws Exception
LaunchergetMainClass in class LauncherException - if the main class cannot be obtainedprotected ClassLoader createClassLoader(Iterator<Archive> archives) throws Exception
LaunchercreateClassLoader in class Launcherarchives - the archivesException - if the classloader cannot be createdprotected Iterator<Archive> getClassPathArchivesIterator() throws Exception
LaunchergetClassPathArchivesIterator in class LauncherException - if the class path archives cannot be obtainedprotected boolean isSearchCandidate(Archive.Entry entry)
entry - the entry to checktrue if the entry is a candidate for further searchingprotected abstract boolean isNestedArchive(Archive.Entry entry)
entry - the entry to checktrue if the entry is a nested item (jar or directory)protected boolean isPostProcessingClassPathArchives()
true, but subclasses that don't override
postProcessClassPathArchives(List) should provide an implementation that
returns false.postProcessClassPathArchives(List) method is implementedprotected void postProcessClassPathArchives(List<Archive> archives) throws Exception
archives - the archivesException - if the post processing failsisPostProcessingClassPathArchives()protected boolean isExploded()
Launchertrue then only regular JARs are supported and the additional URL and
ClassLoader support infrastructure can be optimized.isExploded in class Launcherprotected final Archive getArchive()
LaunchergetArchive in class Launcher