Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1270)

Unified Diff: sdk/lib/convert/converter.dart

Issue 1964953003: Make dart:convert strong mode clean. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove unnecessary dynamics. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/convert/codec.dart ('k') | sdk/lib/convert/encoding.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/convert/converter.dart
diff --git a/sdk/lib/convert/converter.dart b/sdk/lib/convert/converter.dart
index d6d9a9b78bf2f83d29925a8a7f13d9cbd826d8d5..dfcfcdf6f38827c22d2a66a0782a82174fe6182a 100644
--- a/sdk/lib/convert/converter.dart
+++ b/sdk/lib/convert/converter.dart
@@ -10,7 +10,7 @@ part of dart.convert;
* It is recommended that implementations of `Converter` extend this class,
* to inherit any further methods that may be added to the class.
*/
-abstract class Converter<S, T> implements StreamTransformer {
+abstract class Converter<S, T> implements StreamTransformer/*<S, T>*/ {
const Converter();
/**
@@ -24,29 +24,24 @@ abstract class Converter<S, T> implements StreamTransformer {
* Encoding with the resulting converter is equivalent to converting with
* `this` before converting with `other`.
*/
- Converter<S, dynamic> fuse(Converter<T, dynamic> other) {
- return new _FusedConverter<S, T, dynamic>(this, other);
+ Converter<S, dynamic/*=TT*/> fuse/*<TT>*/(
+ Converter<T, dynamic/*=TT*/> other) {
+ return new _FusedConverter<S, T, dynamic/*=TT*/>(this, other);
}
/**
- * Deprecated.
+ * Starts a chunked conversion.
*
- * Use the [ChunkedConverter] interface instead.
+ * The returned sink serves as input for the long-running conversion. The
+ * given [sink] serves as output.
*/
- @deprecated
- ChunkedConversionSink startChunkedConversion(Sink sink) {
+ Sink/*<S>*/ startChunkedConversion(Sink/*<T>*/ sink) {
throw new UnsupportedError(
"This converter does not support chunked conversions: $this");
}
- /**
- * Deprecated.
- *
- * Use the [ChunkedConverter] interface instead.
- */
- @deprecated
- Stream bind(Stream stream) {
- return new Stream.eventTransformed(
+ Stream/*<T>*/ bind(Stream/*<S>*/ stream) {
+ return new Stream/*<T>*/.eventTransformed(
stream,
(EventSink sink) => new _ConverterStreamEventSink(this, sink));
}
@@ -64,4 +59,8 @@ class _FusedConverter<S, M, T> extends Converter<S, T> {
_FusedConverter(this._first, this._second);
T convert(S input) => _second.convert(_first.convert(input));
+
+ Sink/*<S>*/ startChunkedConversion(Sink/*<T>*/ sink) {
+ return _first.startChunkedConversion(_second.startChunkedConversion(sink));
+ }
}
« no previous file with comments | « sdk/lib/convert/codec.dart ('k') | sdk/lib/convert/encoding.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698