I want to have an argument of type "this class" in an interface's method signature, so that any class, for example MyClass
, implementing it will have that method with an argument of type MyClass
.
public interface MyInterface {
public thisClass myMethod(thisClass other);
...
}
public class MyClass implements MyInterface {
// has to reference this class in the implementation
public MyClass myMethod(MyClass other){
...
}
}
Is this possible, or should I just bind the argument with the interface and have each implementation check for it?