インターフェース RepositoryFragment<T>

すべての既知の実装クラス:
RepositoryFragment.ImplementedRepositoryFragmentRepositoryFragment.StructuralRepositoryFragment

public interface RepositoryFragment<T>
リポジトリフラグメントを表す値オブジェクト。

リポジトリフラグメントは、メソッドシグネチャーにコントリビュートする個々の部分です。それらは RepositoryComposition を形成するために使用されます。フラグメントは、純粋に構造的なものにすることも、実装に裏打ちすることもできます。

Structural フラグメントは実装によってサポートされておらず、主にリポジトリ構成の構造を検出し、検証を実行するために使用されます。

Implemented リポジトリフラグメントは、署名のコントリビューターと実装オブジェクトで構成されます。署名のコントリビューターは、リポジトリに使用可能な署名を提供する an interface または just the implementing object の場合があります。

フラグメントは不変です。

導入:
2.0
作成者:
Mark Paluch
関連事項:
  • メソッドの詳細

    • implemented

      static <T> RepositoryFragment<T> implemented(T implementation)
      implementation オブジェクトに基づく実装された RepositoryFragment を作成します。
      パラメーター:
      implementation - null であってはなりません。
      戻り値:
    • implemented

      static <T> RepositoryFragment<T> implemented(ClassSE<T> interfaceClass, T implementation)
      implementation オブジェクトによってサポートされる interfaceClass から実装された RepositoryFragment を作成します。
      パラメーター:
      implementation - null であってはなりません。
      戻り値:
    • structural

      static <T> RepositoryFragment<T> structural(ClassSE<T> interfaceOrImplementation)
      interfaceOrImplementation を指定して構造 RepositoryFragment を作成します。
      パラメーター:
      interfaceOrImplementation - null であってはなりません。
      戻り値:
    • hasMethod

      default boolean hasMethod(MethodSE method)
      名前と正確なパラメーターで MethodSE を見つけてください。メソッドが見つかった場合は true を返し、それ以外の場合は false を返します。
      パラメーター:
      method - null であってはなりません。
      戻り値:
      メソッドが見つかった場合は true、それ以外の場合は false
    • getImplementation

      default OptionalSE<T> getImplementation()
      戻り値:
      オプションの実装。実装されたフラグメントでのみ使用できます。構造フラグメントは常に Optional.empty() を返します。
    • methods

      default StreamSE<MethodSE> methods()
      戻り値:
      この RepositoryFragment によって公開されたメソッドの StreamSE
    • getSignatureContributor

      ClassSE<?> getSignatureContributor()
      戻り値:
      この RepositoryFragment の署名を提供するクラス / インターフェース。
    • withImplementation

      RepositoryFragment<T> withImplementation(T implementation)
      implementation オブジェクトを指定して構造 RepositoryFragment を実装します。実装された RepositoryFragment を返します。
      パラメーター:
      implementation - null であってはなりません。
      戻り値:
      implementation 用に新しく実装された RepositoryFragment