public abstract class MainClassFinder extends ObjectSE
public static main
メソッドを持つクラスを検索します。コンストラクターと説明 |
---|
MainClassFinder() |
修飾子と型 | メソッドと説明 |
---|---|
static StringSE | findMainClass(FileSE rootDirectory) 指定されたディレクトリからメインクラスを見つけます。 |
static StringSE | findMainClass(JarFileSE jarFile, StringSE classesLocation) 指定された jar ファイルでメインクラスを検索します。 |
static StringSE | findSingleMainClass(FileSE rootDirectory) 指定された rootDirectory から単一のメインクラスを検索します。 |
static StringSE | findSingleMainClass(FileSE rootDirectory, StringSE annotationName) 指定された rootDirectory から単一のメインクラスを検索します。 |
static StringSE | findSingleMainClass(JarFileSE jarFile, StringSE classesLocation) 特定の jar ファイルで単一のメインクラスを検索します。 |
static StringSE | findSingleMainClass(JarFileSE jarFile, StringSE classesLocation, StringSE annotationName) 特定の jar ファイルで単一のメインクラスを検索します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public static StringSE findMainClass(FileSE rootDirectory) throws IOExceptionSE
rootDirectory
- 検索するルートディレクトリ null
IOExceptionSE
- ディレクトリを読み取れない場合 public static StringSE findSingleMainClass(FileSE rootDirectory) throws IOExceptionSE
rootDirectory
から単一のメインクラスを検索します。rootDirectory
- 検索するルートディレクトリ null
IOExceptionSE
- ディレクトリを読み取れない場合 public static StringSE findSingleMainClass(FileSE rootDirectory, StringSE annotationName) throws IOExceptionSE
rootDirectory
から単一のメインクラスを検索します。指定された annotationName
のアノテーションが付けられたメインクラスは、そのようなアノテーションのないメインクラスよりも優先されます。rootDirectory
- 検索するルートディレクトリ annotationName
- メインクラスに存在するかもしれないアノテーションの名前 null
IOExceptionSE
- ディレクトリを読み取れない場合 public static StringSE findMainClass(JarFileSE jarFile, StringSE classesLocation) throws IOExceptionSE
jarFile
- 検索する jar ファイル classesLocation
- クラスを含む jar 内の場所 null
IOExceptionSE
- jar ファイルを読み取れない場合 public static StringSE findSingleMainClass(JarFileSE jarFile, StringSE classesLocation) throws IOExceptionSE
jarFile
- 検索する jar ファイル classesLocation
- クラスを含む jar 内の場所 null
IOExceptionSE
- jar ファイルを読み取れない場合 public static StringSE findSingleMainClass(JarFileSE jarFile, StringSE classesLocation, StringSE annotationName) throws IOExceptionSE
annotationName
のアノテーションが付けられたメインクラスは、そのようなアノテーションのないメインクラスよりも優先されます。jarFile
- 検索する jar ファイル classesLocation
- クラスを含む jar 内の場所 annotationName
- メインクラスに存在するかもしれないアノテーションの名前 null
IOExceptionSE
- jar ファイルを読み取れない場合