[Simple-support] Name clash Exception on Matcher
Brought to you by:
niallg
|
From: Fabian K. <fab...@we...> - 2009-04-02 18:55:27
|
Hi Niall,
I just got this:
Name clash: The method match(Class<T>) of type new Matcher(){} has the
same erasure as match(Class) of type Matcher but does not override it.
After partly understanding it[1], I think you could just change
public Transform match(Class type) throws Exception;
to
public <T> Transform<T> match(Class<T> type) throws Exception;
or something similiar.
As far as I understand this will keep compability to the current version
but allows additionally to use generics.
Fabian
[1]
http://stackoverflow.com/questions/502614/type-erasure-overriding-and-generics
|