|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
public interface CompilationUnitBuilder
CtCompilationUnitを生成する。
| メソッドの概要 | |
|---|---|
ClientStorage |
addClientStorage(Object key,
ClientStorage storage)
クライアントの追加情報を追加する。 |
CtImport |
addImport(LtImportDeclaration target)
インポート宣言を追加する。 |
CtDeclaredType<?> |
addType(CtDeclaredType<?> declaration)
宣言された型を追加する。 |
CompilationUnitBuilder |
borrow()
このツールを借りる。 |
void |
clear()
この生成器を初期化する。 |
CtFile |
getFile()
このコンパイル単位を構成するファイルを返す。 |
CompilationUnitKind |
getKind()
コンパイル単位の種類を返す。 |
String |
getName()
このコンパイル単位の名前を返す。 |
CtPackage |
getPackage()
このコンパイル単位が属するパッケージを返す。 |
List<CtDeclaredType<?>> |
getTypes()
これまでに追加した宣言型の一覧を返す。 |
CtDeclaredType<?> |
removeType(String simpleName)
宣言された型を削除する。 |
void |
setFile(CtFile file)
このコンパイル単位を構成するファイルを設定する。 |
void |
setKind(CompilationUnitKind kind)
コンパイル単位の種類を設定する。 |
void |
setLocations(LocationManager locations)
ソースコード上の位置に関する情報を設定する。 |
void |
setName(String name)
このコンパイル単位の名前を設定する。 |
CtPackage |
setPackage(CtPackage declaration)
パッケージ宣言を設定する。 |
CtPackage |
setPackage(LtPackage declaration)
パッケージ宣言を設定する。 |
CtCompilationUnit |
toCompilationUnit()
これまでの情報を元に、 CtCompilationUnitを構築して返す。 |
| インタフェース org.ashikunep.irenka.toolkit.ImportBuilder から継承されたメソッド |
|---|
addImport, addImport, addImportOnDemand, addImportStatic, addImportStaticOnDemand, getImports, removeImport |
| メソッドの詳細 |
|---|
void clear()
CtCompilationUnit toCompilationUnit()
CtCompilationUnitを構築して返す。
CtCompilationUnitCtFile getFile()
void setFile(CtFile file)
file - 設定するファイルString getName()
void setName(String name)
name - 設定する名前CompilationUnitKind getKind()
void setKind(CompilationUnitKind kind)
kind - 設定するコンパイル単位の種類CtPackage getPackage()
List<CtDeclaredType<?>> getTypes()
CtPackage setPackage(CtPackage declaration)
declaration - パッケージ
CtPackage setPackage(LtPackage declaration)
declaration - パッケージ
CtImport addImport(LtImportDeclaration target)
target - 追加する宣言
CtDeclaredType<?> addType(CtDeclaredType<?> declaration)
declaration - 追加する宣言型
null
IllegalArgumentException - パッケージ宣言が適切でない場合setPackage(CtPackage)CtDeclaredType<?> removeType(String simpleName)
simpleName - 宣言された型の単純名
null
IllegalArgumentException - パッケージ宣言が適切でない場合void setLocations(LocationManager locations)
locations - ソースコード上の位置に関する情報
ClientStorage addClientStorage(Object key,
ClientStorage storage)
#toCompilationUnit()が実行された際に、返されるオブジェクトに対して付与される。
key - 追加するオブジェクトを取得するためのキーstorage - 追加するオブジェクト
CompilationUnitBuilder borrow()
Tool の記述:
ImportBuilder 内の borrowTool 内の borrow
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||