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