@Override public <S> IntermediateEventRepresentation upcast(SerializedType outputType, Class<S> expectedRepresentationType, Function<S, S> upcastFunction, Function<MetaData, MetaData> metaDataUpcastFunction) { return new UpcastedEventRepresentation<>(outputType, this, upcastFunction, metaDataUpcastFunction, expectedRepresentationType, converter); }
@Override public <D> SerializedObject<D> getData(Class<D> requiredType) { return converter.convert(getData(), requiredType); }
@Override @SuppressWarnings("unchecked") public SerializedObject<T> getData() { SerializedObject<?> serializedInput = converter.convert(source.getData(), requiredType); return new SimpleSerializedObject<>(upcastFunction.apply((T) serializedInput.getData()), requiredType, getType()); }
@Override public <T> IntermediateEventRepresentation upcast(SerializedType outputType, Class<T> expectedRepresentationType, Function<T, T> upcastFunction, Function<MetaData, MetaData> metaDataUpcastFunction) { return new UpcastedEventRepresentation<>(outputType, this, upcastFunction, metaDataUpcastFunction, expectedRepresentationType, serializer.getConverter()); }
@Override @SuppressWarnings("unchecked") public SerializedObject<T> getData() { SerializedObject<?> serializedInput = converter.convert(source.getData(), requiredType); return new SimpleSerializedObject<>(upcastFunction.apply((T) serializedInput.getData()), requiredType, getType()); }
@Override public <D> SerializedObject<D> getData(Class<D> requiredType) { return converter.convert(getData(), requiredType); }
@Override public <S> IntermediateEventRepresentation upcast(SerializedType outputType, Class<S> expectedRepresentationType, Function<S, S> upcastFunction, Function<MetaData, MetaData> metaDataUpcastFunction) { return new UpcastedEventRepresentation<>(outputType, this, upcastFunction, metaDataUpcastFunction, expectedRepresentationType, converter); }
@Override @SuppressWarnings("unchecked") public SerializedObject<T> getData() { SerializedObject<?> serializedInput = converter.convert(source.getData(), requiredType); return new SimpleSerializedObject<>(upcastFunction.apply((T) serializedInput.getData()), requiredType, getType()); }
@Override public <D> SerializedObject<D> getData(Class<D> requiredType) { return converter.convert(getData(), requiredType); }
@Override public <S> IntermediateEventRepresentation upcast(SerializedType outputType, Class<S> expectedRepresentationType, Function<S, S> upcastFunction, Function<MetaData, MetaData> metaDataUpcastFunction) { return new UpcastedEventRepresentation<>(outputType, this, upcastFunction, metaDataUpcastFunction, expectedRepresentationType, converter); }
@Override public <T> IntermediateEventRepresentation upcast(SerializedType outputType, Class<T> expectedRepresentationType, Function<T, T> upcastFunction, Function<MetaData, MetaData> metaDataUpcastFunction) { return new UpcastedEventRepresentation<>(outputType, this, upcastFunction, metaDataUpcastFunction, expectedRepresentationType, serializer.getConverter()); }
@Override public <T> IntermediateEventRepresentation upcast(SerializedType outputType, Class<T> expectedRepresentationType, Function<T, T> upcastFunction, Function<MetaData, MetaData> metaDataUpcastFunction) { return new UpcastedEventRepresentation<>(outputType, this, upcastFunction, metaDataUpcastFunction, expectedRepresentationType, serializer.getConverter()); }