クラス Launcher

java.lang.ObjectSE
org.springframework.boot.loader.launch.Launcher
既知の直属サブクラス
ExecutableArchiveLauncherPropertiesLauncher

public abstract class Launcher extends ObjectSE
完全に構成されたクラスパスを使用してアプリケーションを起動できるランチャーの基本クラス。
導入:
3.2.0
作成者:
Phillip Webb, Dave Syer, Scott Frederick
  • フィールドの詳細

    • BOOT_CLASSPATH_INDEX_ATTRIBUTE

      protected static final StringSE BOOT_CLASSPATH_INDEX_ATTRIBUTE
      関連事項:
    • DEFAULT_CLASSPATH_INDEX_FILE_NAME

      protected static final StringSE DEFAULT_CLASSPATH_INDEX_FILE_NAME
      関連事項:
    • classPathIndex

      protected org.springframework.boot.loader.launch.ClassPathIndexFile classPathIndex
  • コンストラクターの詳細

    • Launcher

      public Launcher()
  • メソッドの詳細

    • launch

      protected void launch(StringSE[] args) throws ExceptionSE
      アプリケーションを起動します。このメソッドは、サブクラス public static void main(String[] args) メソッドによって呼び出される最初のエントリポイントです。
      パラメーター:
      args - 入力引数
      例外:
      ExceptionSE - アプリケーションの起動に失敗した場合
    • createClassLoader

      protected ClassLoaderSE createClassLoader(CollectionSE<URLSE> urls) throws ExceptionSE
      指定されたアーカイブのクラスローダーを作成します。
      パラメーター:
      urls - クラスパス URL
      戻り値:
      クラスローダー
      例外:
      ExceptionSE - クラスローダーを作成できない場合
    • launch

      protected void launch(ClassLoaderSE classLoader, StringSE mainClassName, StringSE[] args) throws ExceptionSE
      アーカイブファイルと完全に構成されたクラスローダーを指定して、アプリケーションを起動します。
      パラメーター:
      classLoader - クラスローダー
      mainClassName - 実行するメインクラス
      args - 入力引数
      例外:
      ExceptionSE - 打ち上げが失敗した場合
    • isExploded

      protected boolean isExploded()
      ランチャーが分解モードで実行されているかどうかを返します。このメソッドが true を返す場合、通常の JAR のみがサポートされ、追加の URL および ClassLoader サポートインフラストラクチャを最適化できます。
      戻り値:
      jar が展開された場合。
    • getArchive

      protected abstract Archive getArchive()
      起動中のアーカイブを返します。アーカイブがない場合は null を返します。
      戻り値:
      公開されたアーカイブ
    • getMainClass

      protected abstract StringSE getMainClass() throws ExceptionSE
      起動するメインクラスを返します。
      戻り値:
      メインクラスの名前
      例外:
      ExceptionSE - メインクラスを取得できない場合
    • getClassPathUrls

      protected abstract SetSE<URLSE> getClassPathUrls() throws ExceptionSE
      クラスパスの構築に使用されるアーカイブを返します。
      戻り値:
      クラスパスアーカイブ
      例外:
      ExceptionSE - クラスパスアーカイブを取得できない場合
    • getEntryPathPrefix

      protected StringSE getEntryPathPrefix()
      アーカイブ内の関連エントリのパスのプレフィックスを返します。
      戻り値:
      エントリパスのプレフィックス
    • isIncludedOnClassPath

      protected boolean isIncludedOnClassPath(Archive.Entry entry)
      指定されたエントリがクラスパスに追加する必要があるネストされたアイテムであるかどうかを確認します。
      パラメーター:
      entry - チェックするエントリ
      戻り値:
      エントリがネストされたアイテムの場合は true (jar またはディレクトリ)
    • isLibraryFileOrClassesDirectory

      protected boolean isLibraryFileOrClassesDirectory(Archive.Entry entry)
    • isIncludedOnClassPathAndNotIndexed

      protected boolean isIncludedOnClassPathAndNotIndexed(Archive.Entry entry)