Interface SpecificationConverter<S extends Specification<?>,​C,​T>

  • Type Parameters:
    S - the converted specification type (must be a concrete type).
    C - the translation context type.
    T - the type of the target object resulting from the conversion.

    public interface SpecificationConverter<S extends Specification<?>,​C,​T>
    Interface for classes implementing conversion from a particular Specification type to a target object representing this specification. Converters are used by SpecificationTranslators during the translation process.

    If the converted specification contains nested specifications (like AndSpecification or OrSpecification), the translator must be invoked on those to further compose the target object.

    • Method Detail

      • convert

        T convert​(S specification,
                  C context,
                  SpecificationTranslator<C,​T> translator)
        Invoked by the translator to convert a particular type of specification.
        Parameters:
        specification - the specification to convert.
        context - the translation context.
        translator - the specification translator to invoke if the specification contains nested specifications.
        Returns:
        the target object representing the converted specification.