GitHub user StephanEwen opened a pull request:
https://github.com/apache/flink/pull/1744
[FLINK-2788] [apis] Add TypeHint class to allow type-safe generic type
parsing
This adds the `TypeHint` as a type-safe way to create `TypeInformation` for
generic types. I think it should gradually replace the `TypeInfoParser`.
Generic type infos can be created via
```java
TypeInformation<Tuple2<String, Double>> info = TypeInformation.of(new
TypeHint<Tuple2<String, Double>>() {});
```
This creates an inline class that captures the generic parameters, and
fetches them via the TypeExtractor.
*This pull request is in preparation for improving the streaming example.*
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/StephanEwen/incubator-flink typehint
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/1744.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1744
----
commit c4957ce198935a390e838ca74a610108af122ad8
Author: Stephan Ewen <[email protected]>
Date: 2016-02-29T18:24:34Z
[FLINK-2788] [apis] Add TypeHint class to allow type-safe generic type
parsing
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---