class TypeTokenUtils {

    public static List<TypeToken<?>> extractGenericTypeTokens(TypeToken<?> typeToken) {
        List<TypeToken<?>> typeTokens = new ArrayList<>();
        try {
            Type[] types = ((ParameterizedType) typeToken.getType()).getActualTypeArguments();
            for (Type type : types) {
                typeTokens.add(TypeToken.of(type));
            }
        } catch (ClassCastException e) {
            // Do nothing
        }
        return typeTokens;
    }

}