/** * Return all disjoint types. * * @deprecated Use {@link org.eclipse.lsp4j.jsonrpc.json.adapters.TypeUtils#getExpectedTypes(Type)} instead */ @Deprecated public static Collection<Type> getAllDisjoinTypes(Type type) { return collectDisjoinTypes(type, new ArrayList<>()); }
/** * Return all disjoint types. * * @deprecated Use {@link org.eclipse.lsp4j.jsonrpc.json.adapters.TypeUtils#getExpectedTypes(Type)} instead */ @Deprecated public static Collection<Type> getAllDisjoinTypes(Type type) { return collectDisjoinTypes(type, new ArrayList<>()); }
@Deprecated protected static Collection<Type> collectDisjoinTypes(Class<?> type, Collection<Type> types) { for (Type typeParameter : type.getTypeParameters()) { collectDisjoinTypes(typeParameter, types); } return types; }
@Deprecated protected static Collection<Type> collectDisjoinTypes(ParameterizedType type, Collection<Type> types) { for (Type typeArgument : type.getActualTypeArguments()) { collectDisjoinTypes(typeArgument, types); } return types; }
@Deprecated protected static Collection<Type> collectDisjoinTypes(Class<?> type, Collection<Type> types) { for (Type typeParameter : type.getTypeParameters()) { collectDisjoinTypes(typeParameter, types); } return types; }
@Deprecated protected static Collection<Type> collectDisjoinTypes(ParameterizedType type, Collection<Type> types) { for (Type typeArgument : type.getActualTypeArguments()) { collectDisjoinTypes(typeArgument, types); } return types; }
@Deprecated protected static Collection<Type> collectDisjoinTypes(Type type, Collection<Type> types) { if (isEither(type)) { if (type instanceof ParameterizedType) { return collectDisjoinTypes((ParameterizedType) type, types); } if (type instanceof Class) { return collectDisjoinTypes((Class<?>) type, types); } } types.add(type); return types; }
@Deprecated protected static Collection<Type> collectDisjoinTypes(Type type, Collection<Type> types) { if (isEither(type)) { if (type instanceof ParameterizedType) { return collectDisjoinTypes((ParameterizedType) type, types); } if (type instanceof Class) { return collectDisjoinTypes((Class<?>) type, types); } } types.add(type); return types; }