private static Class<?> declaringClassOf(TypeVariable<?> typeVariable) {
    GenericDeclaration genericDeclaration = typeVariable.getGenericDeclaration();
    return genericDeclaration instanceof Class ? (Class<?>) genericDeclaration : null;
  }
Returns the declaring class of {@code typeVariable}, or {@code null} if it was not declared by
a class.
core/src/main/java/feign/Types.java