Package org.seedstack.business.spi
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 particularSpecificationtype to a target object representing this specification. Converters are used bySpecificationTranslators during the translation process.If the converted specification contains nested specifications (like
AndSpecificationorOrSpecification), the translator must be invoked on those to further compose the target object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tconvert(S specification, C context, SpecificationTranslator<C,T> translator)Invoked by the translator to convert a particular type of specification.
-
-
-
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.
-
-