Class<T> question
"Gart, Mitchell" <[email protected]>
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
I am trying to get rid of some compiler warnings in our code. We have a
method:
public static Logger getLogger(Class c) {
return new Log4jLogger(c.getName());
}
and the compiler produces this warning:
Class is a raw type. References to generic type Class<T> should be
parameterized
It is because Class is a generic type but I don't quite understand how I
would change the declaration of the method, and the calls to the method,
to make it parameterized and get rid of the warning. Can somebody
explain this a little bit? Thanks.
- Mitch Gart
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com