public abstract class ExecutableArchiveLauncher extends Launcher
Launchers.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
BOOT_CLASSPATH_INDEX_ATTRIBUTE |
| Modifier | Constructor and Description |
|---|---|
|
ExecutableArchiveLauncher() |
protected |
ExecutableArchiveLauncher(Archive archive) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.ClassLoader |
createClassLoader(java.util.Iterator<Archive> archives)
Create a classloader for the specified archives.
|
protected Archive |
getArchive()
Return the root archive.
|
protected java.util.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 java.lang.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(java.util.List<Archive> archives)
Called to post-process archive entries before they are used.
|
createArchive, createClassLoader, createClassLoader, createMainMethodRunner, getClassPathArchives, launch, launchprotected static final java.lang.String BOOT_CLASSPATH_INDEX_ATTRIBUTE
public ExecutableArchiveLauncher()
protected ExecutableArchiveLauncher(Archive archive)
protected org.springframework.boot.loader.ClassPathIndexFile getClassPathIndex(Archive archive) throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getMainClass()
throws java.lang.Exception
LaunchergetMainClass in class Launcherjava.lang.Exception - if the main class cannot be obtainedprotected java.lang.ClassLoader createClassLoader(java.util.Iterator<Archive> archives) throws java.lang.Exception
LaunchercreateClassLoader in class Launcherarchives - the archivesjava.lang.Exception - if the classloader cannot be createdprotected java.util.Iterator<Archive> getClassPathArchivesIterator() throws java.lang.Exception
LaunchergetClassPathArchivesIterator in class Launcherjava.lang.Exception - 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(java.util.List<Archive> archives) throws java.lang.Exception
archives - the archivesjava.lang.Exception - 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