0
私はいくつかのクラスそのスーパークラスを必要とする汎用メソッドにどのように渡すのですか?
public final class Response<T> {
}
を持っていると私は私が継承するスーパークラスからスーパークラス
public class BaseResponse {
}
が
public class LoginResponse extends BaseResponse{
}
後、私は、オブジェクトResponse<LoginResponse> myResponse
を作成していると私は、次のメソッドにこのオブジェクトを渡したいですスーパークラスのメソッドとフィールドでのみ動作します。
public static boolean responseIsValid(Response<BaseResponse> response, Context context) {
return false;
}
そして、wrong argument type
エラーが発生しています。正しく渡すには?