How to narrow Class<?> to Class<? extends junit.framework.TestCase>

What I am trying to do is

load a class using Class.forName

Class<?> clazz=Class.forName(......);

and pass that loaded class to a method

addTestSuite having the following signature

addTestSuite(Class<?extends junit.framework.TestCase>?

Now Class.forName(.....) returnsClass<?> Object and if I try to pass it to theaddTestSuite method it gives compiler error because it expects

an Object of typeClass<? extends junit.framework.TestCase>.My question is how to narrow down object of Class<?> to Class<? extends junit.framework.TestCase>.

[677 byte] By [Kunal@nitsa] at [2007-11-27 9:24:57]
# 1
This should work :addTestSuite(clazz.asSubclass(junit.framework.TestCase.class))
Keryana at 2007-7-12 22:21:13 > top of Java-index,Core,Core APIs...