Getting type from class name with Java generics

Posted by newbie on Stack Overflow See other posts from Stack Overflow or by newbie
Published on 2010-06-03T20:56:59Z Indexed on 2010/06/03 21:54 UTC
Read the original article Hit count: 110

Filed under:

I have following Class, I need to get type in constructor, how can I do that?

public abstract class MyClass<T> {

    public MyClass()
    {
        // I need T type here ...
    }

}

© Stack Overflow or respective owner

Related posts about java-generics