flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twalthr <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2788] [apis] Add TypeHint class to allo...
Date Tue, 01 Mar 2016 09:19:23 GMT
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.
---

Mime
View raw message