Package org.seedstack.business.spi
Interface SpecificationTranslator<C,T>
-
- Type Parameters:
C- the type of the translation context object.T- the type of the translated target object.
public interface SpecificationTranslator<C,T>Translates aSpecificationinto a target object by invoking the relevantSpecificationConverters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<C>getContextClass()Returns the class of translation context.Class<T>getTargetClass()Returns the class of target object.<S extends Specification<?>>
Ttranslate(S specification, C context)Translates the specified composite specification into a target object.
-
-
-
Method Detail
-
translate
<S extends Specification<?>> T translate(S specification, C context)
Translates the specified composite specification into a target object.- Type Parameters:
S- the type of the specification to translate.- Parameters:
specification- theSpecificationto translate.context- the translation context.- Returns:
- the target object representing the fully translated specification.
-
getContextClass
Class<C> getContextClass()
Returns the class of translation context.- Returns:
- the class of the translation context object.
-
-