Package org.springframework.boot.loader
Class ExecutableArchiveLauncher
java.lang.Object
org.springframework.boot.loader.Launcher
org.springframework.boot.loader.ExecutableArchiveLauncher
- Direct Known Subclasses:
 JarLauncher,WarLauncher
Base class for executable archive 
Launchers.- Since:
 - 1.0.0
 - Author:
 - Phillip Webb, Andy Wilkinson, Madhura Bhave, Scott Frederick
 
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected ClassLoadercreateClassLoader(Iterator<Archive> archives) Create a classloader for the specified archives.protected final ArchiveReturn the root archive.protected StringReturn the path prefix for entries in the archive.Returns the archives that will be used to construct the class path.protected org.springframework.boot.loader.ClassPathIndexFilegetClassPathIndex(Archive archive) protected StringReturns the main class that should be launched.protected booleanReturns if the launcher is running in an exploded mode.protected abstract booleanisNestedArchive(Archive.Entry entry) Determine if the specified entry is a nested item that should be added to the classpath.protected booleanReturn if post processing needs to be applied to the archives.protected booleanisSearchCandidate(Archive.Entry entry) Determine if the specified entry is a candidate for further searching.protected voidpostProcessClassPathArchives(List<Archive> archives) Called to post-process archive entries before they are used.Methods inherited from class org.springframework.boot.loader.Launcher
createArchive, createClassLoader, createMainMethodRunner, launch, launch 
- 
Field Details
- 
BOOT_CLASSPATH_INDEX_ATTRIBUTE
- See Also:
 
 - 
DEFAULT_CLASSPATH_INDEX_FILE_NAME
- See Also:
 
 
 - 
 - 
Constructor Details
- 
ExecutableArchiveLauncher
public ExecutableArchiveLauncher() - 
ExecutableArchiveLauncher
 
 - 
 - 
Method Details
- 
getClassPathIndex
protected org.springframework.boot.loader.ClassPathIndexFile getClassPathIndex(Archive archive) throws IOException - Throws:
 IOException
 - 
getMainClass
Description copied from class:LauncherReturns the main class that should be launched.- Specified by:
 getMainClassin classLauncher- Returns:
 - the name of the main class
 - Throws:
 Exception- if the main class cannot be obtained
 - 
createClassLoader
Description copied from class:LauncherCreate a classloader for the specified archives.- Overrides:
 createClassLoaderin classLauncher- Parameters:
 archives- the archives- Returns:
 - the classloader
 - Throws:
 Exception- if the classloader cannot be created
 - 
getClassPathArchivesIterator
Description copied from class:LauncherReturns the archives that will be used to construct the class path.- Specified by:
 getClassPathArchivesIteratorin classLauncher- Returns:
 - the class path archives
 - Throws:
 Exception- if the class path archives cannot be obtained
 - 
isSearchCandidate
Determine if the specified entry is a candidate for further searching.- Parameters:
 entry- the entry to check- Returns:
 trueif the entry is a candidate for further searching- Since:
 - 2.3.0
 
 - 
isNestedArchive
Determine if the specified entry is a nested item that should be added to the classpath.- Parameters:
 entry- the entry to check- Returns:
 trueif the entry is a nested item (jar or directory)
 - 
isPostProcessingClassPathArchives
protected boolean isPostProcessingClassPathArchives()Return if post processing needs to be applied to the archives. For back compatibility this method returnstrue, but subclasses that don't overridepostProcessClassPathArchives(List)should provide an implementation that returnsfalse.- Returns:
 - if the 
postProcessClassPathArchives(List)method is implemented - Since:
 - 2.3.0
 
 - 
postProcessClassPathArchives
Called to post-process archive entries before they are used. Implementations can add and remove entries.- Parameters:
 archives- the archives- Throws:
 Exception- if the post processing fails- See Also:
 
 - 
getArchiveEntryPathPrefix
Return the path prefix for entries in the archive.- Returns:
 - the path prefix
 
 - 
isExploded
protected boolean isExploded()Description copied from class:LauncherReturns if the launcher is running in an exploded mode. If this method returnstruethen only regular JARs are supported and the additional URL and ClassLoader support infrastructure can be optimized.- Overrides:
 isExplodedin classLauncher- Returns:
 - if the jar is exploded.
 
 - 
getArchive
Description copied from class:LauncherReturn the root archive.- Overrides:
 getArchivein classLauncher- Returns:
 - the root archive
 
 
 -