C
- the type of the translation context.T
- the type of the target object.public abstract class BaseSpecificationTranslator<C,T> extends Object implements SpecificationTranslator<C,T>
SpecificationTranslator
s.
Handles the invocation of the relevant SpecificationConverter
in the convert(Specification, Object)
method.Modifier | Constructor and Description |
---|---|
protected |
BaseSpecificationTranslator()
Creates a base specification translator.
|
Modifier and Type | Method and Description |
---|---|
protected <S extends Specification<?>> |
convert(S specification,
C context)
Find and invoke the relevant
SpecificationConverter for the given specification to
convert it into an object of type T . |
Class<C> |
getContextClass()
Returns the class of translation context.
|
Class<T> |
getTargetClass()
Returns the class of target object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
translate
protected BaseSpecificationTranslator()
protected <S extends Specification<?>> T convert(S specification, C context)
SpecificationConverter
for the given specification to
convert it into an object of type T
.S
- the type of the specification to convert.specification
- the specification to convert.context
- the translation context.public Class<C> getContextClass()
SpecificationTranslator
getContextClass
in interface SpecificationTranslator<C,T>
public Class<T> getTargetClass()
SpecificationTranslator
getTargetClass
in interface SpecificationTranslator<C,T>
Copyright © 2013-2018–2019 SeedStack. All rights reserved.