You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by twalthr <gi...@git.apache.org> on 2016/03/01 10:19:23 UTC

[GitHub] flink pull request: [FLINK-2788] [apis] Add TypeHint class to allo...

Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1744#discussion_r54539847
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/typeinfo/TypeInformation.java ---
    @@ -175,4 +176,39 @@ public boolean isSortKeyType() {
     	 * @return true if obj can be equaled with this, otherwise false
     	 */
     	public abstract boolean canEqual(Object obj);
    +	
    +	// ------------------------------------------------------------------------
    +
    +	/**
    +	 * Creates a TypeInformation for the type described by the given class.
    +	 * 
    +	 * <p>This method only works for non-generic types. For generic types, use the
    +	 * {@link #of(TypeHint)} method.
    +	 *
    +	 * @param typeClass The class of the type.
    +	 * @param <T> The generic type.
    +	 *
    +	 * @return The TypeInformation object for the type described by the hint.
    +	 */
    +	public static <T> TypeInformation<T> of(Class<T> typeClass) {
    --- End diff --
    
    Should we already add an annotation here? I think this will be public API, right?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---