@Nullable protected TypeInformation<?> doGetMapValueType() { return isMap() ? getTypeArgument(getBaseType(MAP_TYPES), 1) : getTypeArguments().stream().skip(1).findFirst().orElse(null); }
public TypeInformation<?> getMapValueType() { if (isMap()) { return getTypeArgument(getType(), Map.class, 1); } List<TypeInformation<?>> arguments = getTypeArguments(); if (arguments.size() > 1) { return arguments.get(1); } return null; }
public TypeInformation<?> getActualType() { if (isMap()) { return getMapValueType(); } if (isCollectionLike()) { return getComponentType(); } List<TypeInformation<?>> arguments = getTypeArguments(); if (arguments.isEmpty()) { return this; } return arguments.get(arguments.size() - 1); }
@Nullable public TypeInformation<?> getActualType() { if (isMap()) { return getMapValueType(); } if (isCollectionLike()) { return getComponentType(); } return this; }
@Nullable protected TypeInformation<?> doGetComponentType() { Class<S> rawType = getType(); if (rawType.isArray()) { return createInfo(rawType.getComponentType()); } if (isMap()) { return getTypeArgument(getBaseType(MAP_TYPES), 0); } if (Iterable.class.isAssignableFrom(rawType)) { return getTypeArgument(Iterable.class, 0); } List<TypeInformation<?>> arguments = getTypeArguments(); return arguments.size() > 0 ? arguments.get(0) : null; }
public TypeInformation<?> getComponentType() { Class<S> rawType = getType(); if (rawType.isArray()) { return createInfo(rawType.getComponentType()); } if (isMap()) { return getTypeArgument(rawType, Map.class, 0); } if (Iterable.class.isAssignableFrom(rawType)) { return getTypeArgument(rawType, Iterable.class, 0); } List<TypeInformation<?>> arguments = getTypeArguments(); if (arguments.size() > 0) { return arguments.get(0); } return null; }