aspose file tools*
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
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: 36486
    
  16
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
 
Similar Threads
Generics
Generics
Generics and Overriding
Compiling problem with generics.
Understanding Generics