I read all the other questions about this, but i can't understand why there is type erasure in my case. I have
public <T extends Aclass&Binterface> boolean test(final T param) { ... } public boolean test(final Aclass pOtherPPShape) { ... } Method test(Aclass) has the same erasure test(Aclass) as another method in type ClassName
How should i write two methods that operate on the same class but one with an interface and one not? (i can't modify the AClass since is from an external library, and have a lot of subtypes with which this code should work)
Is the use of instanceof right in this case?
EDIT: i use this in a collision test. If the shape passed is instance of an interface, i get a collisionmask(with a method of the interface) and then call the "checker", if it's not, i want to instantiate a dummy collisionmask that does some different stuff and pass to the same method of the "checker" (that has as parameters the 2 shapes and 2 collisonmasks)
public <T extends Aclass> boolean test(final T param)