インターフェース RepositoryFragment<T>
- すべての既知の実装クラス:
RepositoryFragment.ImplementedRepositoryFragment
,RepositoryFragment.StructuralRepositoryFragment
public interface RepositoryFragment<T>
リポジトリフラグメントを表す値オブジェクト。
リポジトリフラグメントは、メソッドシグネチャーにコントリビュートする個々の部分です。それらは RepositoryComposition
を形成するために使用されます。フラグメントは、純粋に構造的なものにすることも、実装に裏打ちすることもできます。
Structural
フラグメントは実装によってサポートされておらず、主にリポジトリ構成の構造を検出し、検証を実行するために使用されます。
Implemented
リポジトリフラグメントは、署名のコントリビューターと実装オブジェクトで構成されます。署名のコントリビューターは、リポジトリに使用可能な署名を提供する an interface
または just the implementing object
の場合があります。
フラグメントは不変です。
- 導入:
- 2.0
- 作成者:
- Mark Paluch
- 関連事項:
ネストされたクラスのサマリー
ネストされたクラス修飾子と型インターフェース説明static class
static class
メソッドのサマリー
修飾子と型メソッド説明default OptionalSE<T>
ClassSE<?>
default boolean
名前と正確なパラメーターでMethod
SE を見つけてください。static <T> RepositoryFragment<T>
implemented
(ClassSE<T> interfaceClass, T implementation) static <T> RepositoryFragment<T>
implemented
(T implementation) implementation
オブジェクトに基づく実装されたRepositoryFragment
を作成します。methods()
static <T> RepositoryFragment<T>
structural
(ClassSE<T> interfaceOrImplementation) interfaceOrImplementation
を指定して構造RepositoryFragment
を作成します。withImplementation
(T implementation) implementation
オブジェクトを指定して、構造RepositoryFragment
を実装します。
メソッドの詳細
implemented
implementation
オブジェクトに基づく実装されたRepositoryFragment
を作成します。- パラメーター:
implementation
- null であってはなりません。- 戻り値:
implemented
- パラメーター:
implementation
- null であってはなりません。- 戻り値:
structural
interfaceOrImplementation
を指定して構造RepositoryFragment
を作成します。- パラメーター:
interfaceOrImplementation
- null であってはなりません。- 戻り値:
hasMethod
名前と正確なパラメーターでMethod
SE を見つけてください。メソッドが見つかった場合は true を返し、それ以外の場合は false を返します。- パラメーター:
method
- null であってはなりません。- 戻り値:
- メソッドが見つかった場合は true、それ以外の場合は false
getImplementation
- 戻り値:
- オプションの実装。実装されたフラグメントでのみ使用できます。構造フラグメントは常に
Optional.empty()
を返します。
methods
- 戻り値:
- この
RepositoryFragment
によって公開されたメソッドのStream
SE。
getSignatureContributor
ClassSE<?> getSignatureContributor()- 戻り値:
- この
RepositoryFragment
の署名を提供するクラス / インターフェース。
withImplementation
- パラメーター:
implementation
- null であってはなりません。- 戻り値:
implementation
用に新しく実装されたRepositoryFragment
。