how about:
public static <T> T
getInstance(Class<T> aClass)
{
// TODO:
}
regards,
Giovanni
nicolas de loof wrote:
Hello,
my question is fully off topic, but Struts2 is the only java5 project I know.
I'd like a method to return an instance of a class passed as parameter :
public Object getInstance( Class clazz )
I'd like to use generics to make the return type in sync with the
class type. Is this possible ???
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]