public abstract class ExecutableArchiveLauncher extends Launcher
Launcher
s.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 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, launch
protected static final String BOOT_CLASSPATH_INDEX_ATTRIBUTE
public ExecutableArchiveLauncher()
protected ExecutableArchiveLauncher(Archive archive)
protected org.springframework.boot.loader.ClassPathIndexFile getClassPathIndex(Archive archive) throws IOException
IOException
protected String getMainClass() throws Exception
Launcher
getMainClass
in class Launcher
Exception
- if the main class cannot be obtainedprotected ClassLoader createClassLoader(Iterator<Archive> archives) throws Exception
Launcher
createClassLoader
in class Launcher
archives
- the archivesException
- if the classloader cannot be createdprotected Iterator<Archive> getClassPathArchivesIterator() throws Exception
Launcher
getClassPathArchivesIterator
in class Launcher
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 folder)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()
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()