public abstract class ExecutableArchiveLauncher extends Launcher
Launcher
s.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, launch
protected 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.IOException
protected java.lang.String getMainClass() throws java.lang.Exception
Launcher
getMainClass
in class Launcher
java.lang.Exception
- if the main class cannot be obtainedprotected java.lang.ClassLoader createClassLoader(java.util.Iterator<Archive> archives) throws java.lang.Exception
Launcher
createClassLoader
in class Launcher
archives
- the archivesjava.lang.Exception
- if the classloader cannot be createdprotected java.util.Iterator<Archive> getClassPathArchivesIterator() throws java.lang.Exception
Launcher
getClassPathArchivesIterator
in class Launcher
java.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()
Launcher
true
then only regular JARs are supported and the additional URL and
ClassLoader support infrastructure can be optimized.isExploded
in class Launcher
protected final Archive getArchive()
Launcher
getArchive
in class Launcher