public class TLcdObjectTransformationProvider extends Object
The responsibility of this class is to provide ILcdObjectTransformation
instances
to transform from a source TLcdDataType
to a target TLcdDataType
.
Objects of this class are thread-safe.
Constructor and Description |
---|
TLcdObjectTransformationProvider()
Creates a new transformation provider.
|
Modifier and Type | Method and Description |
---|---|
TLcdObjectTransformationProvider |
getInverse()
Returns the inverse of this provider.
|
ILcdObjectTransformation |
getObjectTransformation(TLcdDataType aSourceType,
TLcdDataType aTargetType)
Returns the object transformation that can transform instances of the given source
type to instances of the given target type.
|
Collection<TLcdDataType> |
getTargetTypes(TLcdDataType aType)
Returns a collection of target data types for which transformations have been
registered for the given source type.
|
void |
register(TLcdDataType aSourceType,
TLcdDataType aTargetType,
ILcdObjectTransformation aTransformation)
Registers a transformation from the given source type to the given target type.
|
public TLcdObjectTransformationProvider()
public ILcdObjectTransformation getObjectTransformation(TLcdDataType aSourceType, TLcdDataType aTargetType)
Returns the object transformation that can transform instances of the given source
type to instances of the given target type. Returns null
if no such
transformation can be found.
The implementation first looks for transformation that have been registered on this instance for the given source and target type. If no such transformation can be found, it tries to find an appropriate default transformation.
aSourceType
- the source typeaTargetType
- the target typepublic Collection<TLcdDataType> getTargetTypes(TLcdDataType aType)
aType
- the source typepublic void register(TLcdDataType aSourceType, TLcdDataType aTargetType, ILcdObjectTransformation aTransformation)
getInverse()
.aSourceType
- the source typeaTargetType
- the target typeaTransformation
- the transformation to registerpublic TLcdObjectTransformationProvider getInverse()