org.springframework.boot.loader

Class ExecutableArchiveLauncher

  • Direct Known Subclasses:
    JarLauncher, WarLauncher


    public abstract class ExecutableArchiveLauncher
    extends Launcher
    Base class for executable archive Launchers.
    Author:
    Phillip Webb, Andy Wilkinson
    • Constructor Detail

      • ExecutableArchiveLauncher

        public ExecutableArchiveLauncher()
      • ExecutableArchiveLauncher

        protected ExecutableArchiveLauncher(Archive archive)
    • Method Detail

      • getArchive

        protected final Archive getArchive()
      • getMainClass

        protected String getMainClass()
                               throws Exception
        Description copied from class: Launcher
        Returns the main class that should be launched.
        Specified by:
        getMainClass in class Launcher
        Returns:
        the name of the main class
        Throws:
        Exception - if the main class cannot be obtained
      • getClassPathArchives

        protected List<Archive> getClassPathArchives()
                                              throws Exception
        Description copied from class: Launcher
        Returns the archives that will be used to construct the class path.
        Specified by:
        getClassPathArchives in class Launcher
        Returns:
        the class path archives
        Throws:
        Exception - if the class path archives cannot be obtained
      • isNestedArchive

        protected abstract boolean isNestedArchive(Archive.Entry entry)
        Determine if the specified JarEntry is a nested item that should be added to the classpath. The method is called once for each entry.
        Parameters:
        entry - the jar entry
        Returns:
        true if the entry is a nested item (jar or folder)
      • postProcessClassPathArchives

        protected void postProcessClassPathArchives(List<Archive> archives)
                                             throws Exception
        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