static <T> Class<T> getTypeParameter(Class<?> clazz, Class<? super T> bound) {
		Type t = checkNotNull(clazz);
		while (t instanceof Class<?>) {
			t = ((Class<?>) t).getGenericSuperclass();
		}
		/**
		 * This is not guaranteed to work for all cases with convoluted piping
		 * of type parameters: but it can at least resolve straight-forward
		 * extension with single type parameter (as per [Issue-89]). And when it
		 * fails to do that, will indicate with specific exception.
		 */
		if(t instanceof ParameterizedType) {
			Class<T> result=processParameterizedType(bound, (ParameterizedType) t);
			if(result!=null) {
				return result;
			}
		}
		throw new IllegalStateException("Cannot figure out type parameterization for "+ clazz.getName());
	}
static <T> Class<T> getTypeParameter(Class<?> clazz, Class<? super T> bound) {
		Type t = checkNotNull(clazz);
		while (t instanceof Class<?>) {
			t = ((Class<?>) t).getGenericSuperclass();
		}
		
		if(t instanceof ParameterizedType) {
			Class<T> result=processParameterizedType(bound, (ParameterizedType) t);
			if(result!=null) {
				return result;
			}
		}
		throw new IllegalStateException("Cannot figure out type parameterization for "+ clazz.getName());
	}
static < T > Class < T > getTypeParameter ( Class < ? > clazz , Class < ? super T > bound ) { Type t = checkNotNull ( clazz ) ; while ( t instanceof Class < ? > ) { t = ( ( Class < ? > ) t ) . getGenericSuperclass ( ) ; } /**
		 * This is not guaranteed to work for all cases with convoluted piping
		 * of type parameters: but it can at least resolve straight-forward
		 * extension with single type parameter (as per [Issue-89]). And when it
		 * fails to do that, will indicate with specific exception.
		 */ if ( t instanceof ParameterizedType ) { Class < T > result = processParameterizedType ( bound , ( ParameterizedType ) t ) ; if ( result != null ) { return result ; } } throw new IllegalStateException ( "Cannot figure out type parameterization for " + clazz . getName ( ) ) ; }
Finds the type parameter for the given class which is assignable to the
bound class.

@param clazz
a parameterized class
@param bound
the type bound
@param <T>
the type bound
@return the class's type parameter
Finds the type parameter for the given class which is assignable to the bound class .