Basically, I want to create a method that has the following signature:
public <T> T getShellTab(Class<T extends ShellTab> shellTabClass)
but this is not true. Java I want to be able to pass a class that is a subclass of ShellTab , and have an instance of this class.
public <T> T getShellTab(Class<T> shellTabClass)
works fine, but I would like to make shellTabClass be a subclass of ShellTab .
Any ideas on how to do this?
Thanks.
source share