private TypeVariable<?> getTypeVariable(final String name, final Class<?> ownerClass, final TypeMap typeMap) {
        final Set<TypeVariable<?>> keys = typeMap.getKeys();

        for (final TypeVariable<?> key : keys) {
            if (key.getName().equals(name) && key.getGenericDeclaration().equals(ownerClass)) {
                return key;
            }
        }

        return null;
    }