TypeDescriptor implements Serializable { public Class<? super T> getRawType() { return token.getRawType(); } private  TypeDescriptor(TypeToken<T> token); protected  TypeDescriptor(); protected  TypeDescriptor(Object instance); @SuppressWarnings("unchecked") protected  TypeDescriptor(Class<?> clazz); static TypeDescriptor<T> of(Class<T> type); @SuppressWarnings("unchecked") static TypeDescriptor<?> of(Type type); Type getType(); Class<? super T> getRawType(); TypeDescriptor<?> getComponentType(); final TypeDescriptor<? super T> getSupertype(Class<? super T> superclass); final boolean isArray(); final TypeVariable<Class<? super T>> getTypeParameter(String paramName); final boolean isSupertypeOf(TypeDescriptor<?> source); final boolean isSubtypeOf(TypeDescriptor<?> parent); List<TypeDescriptor<?>> getArgumentTypes(Method method); TypeDescriptor<?> resolveType(Type type); @SuppressWarnings("rawtypes") Iterable<TypeDescriptor> getTypes(); @SuppressWarnings("rawtypes") Iterable<TypeDescriptor> getInterfaces(); @SuppressWarnings("rawtypes") Iterable<TypeDescriptor> getClasses(); @SuppressWarnings("unchecked") TypeDescriptor<T> where(
      TypeParameter<X> typeParameter, TypeDescriptor<X> typeDescriptor); @SuppressWarnings("unchecked") TypeDescriptor<T> where(Type formal, Type actual); boolean hasUnresolvedParameters(); @Override String toString(); @Override boolean equals(@Nullable Object other); @Override int hashCode();  }
@Test public void testTypeDescriptorImmediate() throws Exception { assertEquals(Boolean.class, new TypeDescriptor<Boolean>() {}.getRawType()); assertEquals(Double.class, new TypeDescriptor<Double>() {}.getRawType()); assertEquals(Float.class, new TypeDescriptor<Float>() {}.getRawType()); assertEquals(Integer.class, new TypeDescriptor<Integer>() {}.getRawType()); assertEquals(Long.class, new TypeDescriptor<Long>() {}.getRawType()); assertEquals(Short.class, new TypeDescriptor<Short>() {}.getRawType()); assertEquals(String.class, new TypeDescriptor<String>() {}.getRawType()); }