@Override public Type getRawType() { return typeInformation.getType(); }
@Override public boolean isAssignableFrom(TypeInformation<?> target) { return getType().isAssignableFrom(target.getType()); } }
@Override public boolean isAssignableFrom(TypeInformation<?> target) { return getType().isAssignableFrom(target.getType()); }
@Override @SuppressWarnings("unchecked") public TypeInformation<? extends S> specialize(ClassTypeInformation<?> type) { Assert.isTrue(getType().isAssignableFrom(type.getType()), String.format("%s must be assignable from %s", getType(), type.getType())); List<TypeInformation<?>> arguments = getTypeArguments(); return (TypeInformation<? extends S>) (arguments.isEmpty() ? type : createInfo(new SyntheticParamterizedType(type, arguments))); }
private static Class<?> getCollectionType(TypeInformation<?> type) { if (type.getType().isInterface()) { return type.getType(); } if (ClassTypeInformation.LIST.isAssignableFrom(type)) { return ClassTypeInformation.LIST.getType(); } if (ClassTypeInformation.SET.isAssignableFrom(type)) { return ClassTypeInformation.SET.getType(); } if (!type.isCollectionLike()) { return ClassTypeInformation.LIST.getType(); } return type.getType(); }