你能帮我处理泛型吗?
我现在有
public abstract class TestWsClient extends WsRpcClient {
public abstract void clientMethod(TestObject testObject);
}
public interface TestWsServer extends WsRpcServer<TestWsClient> {
public abstract void serverMethod(String message, TestWsClient client, String arg1, int arg2, TestObject objTest);
}
public interface TestWsServerAsync{
public abstract void serverMethod(String arg1, int arg2, TestObject objTest);
}
class SomeClass{
public <T extends WsRpcClient> void join(Object server, T client, WsRpcOnStateHandler stateHandler){
}
}
SomeClass.join(new TestWsServerAsync(){...}, [instaneof TestWsClient])
我需要签入方法SomeClass.join
。如果TestWsServer
由 扩展WsRpcServer<T>
。
谢谢你的想法。