Class TypeInfoFactory<T>

  • Type Parameters:
    T - type for which TypeInformation is created
    Direct Known Subclasses:
    EitherTypeInfoFactory, ListViewTypeInfoFactory, MapViewTypeInfoFactory

    @Public
    public abstract class TypeInfoFactory<T>
    extends Object
    Base class for implementing a type information factory. A type information factory allows for plugging-in user-defined TypeInformation into the Flink type system. The factory is called during the type extraction phase if the corresponding type has been annotated with TypeInfo. In a hierarchy of types the closest factory will be chosen while traversing upwards.
    • Constructor Detail

      • TypeInfoFactory

        public TypeInfoFactory()
    • Method Detail

      • createTypeInfo

        public abstract TypeInformation<T> createTypeInfo​(Type t,
                                                          Map<String,​TypeInformation<?>> genericParameters)
        Creates type information for the type the factory is targeted for. The parameters provide additional information about the type itself as well as the type's generic type parameters.
        Parameters:
        t - the exact type the type information is created for; might also be a subclass of <T>
        genericParameters - mapping of the type's generic type parameters to type information extracted with Flink's type extraction facilities; null values indicate that type information could not be extracted for this parameter
        Returns:
        type information for the type the factory is targeted for