@SuppressWarnings("unchecked") @PublicEvolving public static <X extends Tuple> TupleTypeInfo<X> getBasicAndBasicValueTupleTypeInfo(Class<?>... basicTypes) { if (basicTypes == null || basicTypes.length == 0) { throw new IllegalArgumentException(); } TypeInformation<?>[] infos = new TypeInformation<?>[basicTypes.length]; for (int i = 0; i < infos.length; i++) { Class<?> type = basicTypes[i]; if (type == null) { throw new IllegalArgumentException("Type at position " + i + " is null."); } TypeInformation<?> info = BasicTypeInfo.getInfoFor(type); if (info == null) { try { info = ValueTypeInfo.getValueTypeInfo((Class<Value>) type); if (!((ValueTypeInfo<?>) info).isBasicValueType()) { throw new IllegalArgumentException("Type at position " + i + " is not a basic or value type."); } } catch (ClassCastException | InvalidTypesException e) { throw new IllegalArgumentException("Type at position " + i + " is not a basic or value type.", e); } } infos[i] = info; } return (TupleTypeInfo<X>) new TupleTypeInfo<>(infos); }
return (TypeInformation<OUT>) ValueTypeInfo.getValueTypeInfo(valueClass);
if (!((ValueTypeInfo<?>) typeInfo).equals(actual = ValueTypeInfo.getValueTypeInfo((Class<? extends Value>) type))) { throw new InvalidTypesException("Value type '" + typeInfo + "' expected but was '" + actual + "'.");
@SuppressWarnings("unchecked") @PublicEvolving public static <X extends Tuple> TupleTypeInfo<X> getBasicAndBasicValueTupleTypeInfo(Class<?>... basicTypes) { if (basicTypes == null || basicTypes.length == 0) { throw new IllegalArgumentException(); } TypeInformation<?>[] infos = new TypeInformation<?>[basicTypes.length]; for (int i = 0; i < infos.length; i++) { Class<?> type = basicTypes[i]; if (type == null) { throw new IllegalArgumentException("Type at position " + i + " is null."); } TypeInformation<?> info = BasicTypeInfo.getInfoFor(type); if (info == null) { try { info = ValueTypeInfo.getValueTypeInfo((Class<Value>) type); if (!((ValueTypeInfo<?>) info).isBasicValueType()) { throw new IllegalArgumentException("Type at position " + i + " is not a basic or value type."); } } catch (ClassCastException | InvalidTypesException e) { throw new IllegalArgumentException("Type at position " + i + " is not a basic or value type.", e); } } infos[i] = info; } return (TupleTypeInfo<X>) new TupleTypeInfo<>(infos); }
@SuppressWarnings("unchecked") @PublicEvolving public static <X extends Tuple> TupleTypeInfo<X> getBasicAndBasicValueTupleTypeInfo(Class<?>... basicTypes) { if (basicTypes == null || basicTypes.length == 0) { throw new IllegalArgumentException(); } TypeInformation<?>[] infos = new TypeInformation<?>[basicTypes.length]; for (int i = 0; i < infos.length; i++) { Class<?> type = basicTypes[i]; if (type == null) { throw new IllegalArgumentException("Type at position " + i + " is null."); } TypeInformation<?> info = BasicTypeInfo.getInfoFor(type); if (info == null) { try { info = ValueTypeInfo.getValueTypeInfo((Class<Value>) type); if (!((ValueTypeInfo<?>) info).isBasicValueType()) { throw new IllegalArgumentException("Type at position " + i + " is not a basic or value type."); } } catch (ClassCastException | InvalidTypesException e) { throw new IllegalArgumentException("Type at position " + i + " is not a basic or value type.", e); } } infos[i] = info; } return (TupleTypeInfo<X>) new TupleTypeInfo<>(infos); }
clazz = loadClass(VALUE_PACKAGE + "." + className + "Value"); returnType = ValueTypeInfo.getValueTypeInfo((Class<Value>) clazz);
return (TypeInformation<OUT>) ValueTypeInfo.getValueTypeInfo(valueClass);
return (TypeInformation<OUT>) ValueTypeInfo.getValueTypeInfo(valueClass);
if (!((ValueTypeInfo<?>) typeInfo).equals(actual = ValueTypeInfo.getValueTypeInfo((Class<? extends Value>) type))) { throw new InvalidTypesException("Value type '" + typeInfo + "' expected but was '" + actual + "'.");
if (!((ValueTypeInfo<?>) typeInfo).equals(actual = ValueTypeInfo.getValueTypeInfo((Class<? extends Value>) type))) { throw new InvalidTypesException("Value type '" + typeInfo + "' expected but was '" + actual + "'.");