use of org.eclipse.dataspaceconnector.ids.spi.transform.IdsTypeTransformer in project DataSpaceConnector by eclipse-dataspaceconnector.
the class TransformerRegistryImpl method transform.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Nullable
private <INPUT, OUTPUT> OUTPUT transform(INPUT object, Class<OUTPUT> outputType, TransformerContext context) {
Objects.requireNonNull(object);
IdsTypeTransformer idsTypeTransformer = findEligibleTransformer(object, outputType);
if (idsTypeTransformer == null) {
// this is a programming error
throw new EdcException("Transformer not found for pair:" + new TransformKey(object.getClass(), outputType));
}
return outputType.cast(idsTypeTransformer.transform(object, context));
}
use of org.eclipse.dataspaceconnector.ids.spi.transform.IdsTypeTransformer in project DataSpaceConnector by eclipse-dataspaceconnector.
the class IdsTransformerRegistryImpl method transform.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Nullable
private <INPUT, OUTPUT> OUTPUT transform(INPUT object, Class<OUTPUT> outputType, TransformerContext context) {
Objects.requireNonNull(object);
IdsTypeTransformer idsTypeTransformer = findEligibleTransformer(object, outputType);
if (idsTypeTransformer == null) {
// this is a programming error
throw new EdcException("Transformer not found for pair:" + new TransformKey(object.getClass(), outputType));
}
return outputType.cast(idsTypeTransformer.transform(object, context));
}
Aggregations