wood burning stoves 2.0*
The moose likes Java in General and the fly likes Overloading methods w/ generics causing erasure error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Overloading methods w/ generics causing erasure error" Watch "Overloading methods w/ generics causing erasure error" New topic
Author

Overloading methods w/ generics causing erasure error

Bobby Anderson
Ranch Hand

Joined: Oct 28, 2008
Posts: 114
Before generics I had this:



So I want to change to this:


But of course with erasure both these methods now have the same signature. Is there a good way around this or am I stuck with using arrays or changing one of the method names.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38519
    
  23
How about generic methods? Can you write public <T> void foo(List<T> lll) . . .?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Overloading methods w/ generics causing erasure error