TypeDescriptors { public static TypeDescriptor<String> strings() { return new TypeDescriptor<String>() {}; }  static TypeDescriptor<Boolean> booleans(); static TypeDescriptor<Double> doubles(); static TypeDescriptor<Float> floats(); static TypeDescriptor<Integer> integers(); static TypeDescriptor<Long> longs(); static TypeDescriptor<Short> shorts(); static TypeDescriptor<BigDecimal> bigdecimals(); static TypeDescriptor<BigInteger> bigintegers(); static TypeDescriptor<Row> rows(); static TypeDescriptor<String> strings(); static TypeDescriptor<Character> characters(); static TypeDescriptor<Byte> bytes(); static TypeDescriptor<Void> nulls(); static TypeDescriptor<KV<K, V>> kvs(
      TypeDescriptor<K> key, TypeDescriptor<V> value); static TypeDescriptor<Set<T>> sets(TypeDescriptor<T> element); static TypeDescriptor<Map<K, V>> maps(
      TypeDescriptor<K> keyType, TypeDescriptor<V> valueType); static TypeDescriptor<List<T>> lists(TypeDescriptor<T> element); static TypeDescriptor<Iterable<T>> iterables(TypeDescriptor<T> iterable); static TypeDescriptor<Void> voids(); @SuppressWarnings("unchecked") static TypeDescriptor<V> extractFromTypeParameters(
      T instance, Class<? super T> supertype, TypeVariableExtractor<T, V> extractor); @SuppressWarnings("unchecked") static TypeDescriptor<V> extractFromTypeParameters(
      TypeDescriptor<T> type, Class<? super T> supertype, TypeVariableExtractor<T, V> extractor); static TypeDescriptor<InputT> inputOf(
      ProcessFunction<InputT, OutputT> fn); static TypeDescriptor<InputT> inputOf(
      SerializableFunction<InputT, OutputT> fn); static TypeDescriptor<OutputT> outputOf(
      ProcessFunction<InputT, OutputT> fn); static TypeDescriptor<OutputT> outputOf(
      SerializableFunction<InputT, OutputT> fn); static TypeDescriptor<InputT> inputOf(
      Contextful.Fn<InputT, OutputT> fn); static TypeDescriptor<OutputT> outputOf(
      Contextful.Fn<InputT, OutputT> fn);  }
@Test public void testTypeDescriptorsTypeParameterOfErased() throws Exception { Generic<Integer, String> instance = TypeDescriptorsTest.typeErasedGeneric(); TypeDescriptor<Integer> fooT = extractFooT(instance); assertNotNull(fooT); assertEquals("ActualFooT", fooT.toString()); assertEquals(strings(), extractBarT(instance)); TypeDescriptor<KV<Integer, String>> kvT = extractKV(instance); assertNotNull(kvT); assertThat(kvT.toString(), CoreMatchers.containsString("KV<ActualFooT, java.lang.String>")); }