/** * Creates a new {@link org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo} from a * {@link TypeInformation} for the component type. * * <p> * This must be used in cases where the complete type of the array is not available as a * {@link java.lang.reflect.Type} or {@link java.lang.Class}. */ @SuppressWarnings("unchecked") @PublicEvolving public static <T, C> ObjectArrayTypeInfo<T, C> getInfoFor(TypeInformation<C> componentInfo) { checkNotNull(componentInfo); return new ObjectArrayTypeInfo<T, C>( (Class<T>)Array.newInstance(componentInfo.getTypeClass(), 0).getClass(), componentInfo); } }
@PublicEvolving public static <T, C> ObjectArrayTypeInfo<T, C> getInfoFor(Class<T> arrayClass, TypeInformation<C> componentInfo) { checkNotNull(arrayClass); checkNotNull(componentInfo); checkArgument(arrayClass.isArray(), "Class " + arrayClass + " must be an array."); return new ObjectArrayTypeInfo<T, C>(arrayClass, componentInfo); }
/** * Creates a new {@link org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo} from a * {@link TypeInformation} for the component type. * * <p> * This must be used in cases where the complete type of the array is not available as a * {@link java.lang.reflect.Type} or {@link java.lang.Class}. */ @SuppressWarnings("unchecked") @PublicEvolving public static <T, C> ObjectArrayTypeInfo<T, C> getInfoFor(TypeInformation<C> componentInfo) { checkNotNull(componentInfo); return new ObjectArrayTypeInfo<T, C>( (Class<T>)Array.newInstance(componentInfo.getTypeClass(), 0).getClass(), componentInfo); } }
/** * Creates a new {@link org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo} from a * {@link TypeInformation} for the component type. * * <p> * This must be used in cases where the complete type of the array is not available as a * {@link java.lang.reflect.Type} or {@link java.lang.Class}. */ @SuppressWarnings("unchecked") @PublicEvolving public static <T, C> ObjectArrayTypeInfo<T, C> getInfoFor(TypeInformation<C> componentInfo) { checkNotNull(componentInfo); return new ObjectArrayTypeInfo<T, C>( (Class<T>)Array.newInstance(componentInfo.getTypeClass(), 0).getClass(), componentInfo); } }
@PublicEvolving public static <T, C> ObjectArrayTypeInfo<T, C> getInfoFor(Class<T> arrayClass, TypeInformation<C> componentInfo) { checkNotNull(arrayClass); checkNotNull(componentInfo); checkArgument(arrayClass.isArray(), "Class " + arrayClass + " must be an array."); return new ObjectArrayTypeInfo<T, C>(arrayClass, componentInfo); }
@PublicEvolving public static <T, C> ObjectArrayTypeInfo<T, C> getInfoFor(Class<T> arrayClass, TypeInformation<C> componentInfo) { checkNotNull(arrayClass); checkNotNull(componentInfo); checkArgument(arrayClass.isArray(), "Class " + arrayClass + " must be an array."); return new ObjectArrayTypeInfo<T, C>(arrayClass, componentInfo); }