TypeDescriptor implements Serializable { public List<TypeDescriptor<?>> getArgumentTypes(Method method) { Invokable<?, ?> typedMethod = token.method(method); List<TypeDescriptor<?>> argTypes = Lists.newArrayList(); for (Parameter parameter : typedMethod.getParameters()) { argTypes.add(new SimpleTypeDescriptor<>(parameter.getType())); } return argTypes; } 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 testGetArgumentTypes() throws Exception { Method identity = Id.class.getDeclaredMethod("identity", Object.class); TypeToken<Id<String>> token = new TypeToken<Id<String>>() {}; TypeDescriptor<Id<String>> descriptor = new TypeDescriptor<Id<String>>() {}; assertEquals( token.method(identity).getParameters().get(0).getType().getType(), descriptor.getArgumentTypes(identity).get(0).getType()); TypeToken<Id<List<String>>> genericToken = new TypeToken<Id<List<String>>>() {}; TypeDescriptor<Id<List<String>>> genericDescriptor = new TypeDescriptor<Id<List<String>>>() {}; assertEquals( genericToken.method(identity).getParameters().get(0).getType().getType(), genericDescriptor.getArgumentTypes(identity).get(0).getType()); }