我必须将Map<ClassType1,Object>
. 如果我Map.class
只通过,我有一个错误。所以我想知道什么是类Map<MyClassType1,Object>
?
public class GetSessionRequest extends SpiceRequest<Map<ClassType1, Object>> {
private Client mClient;
public GetSessionRequest(Class<Map<ClassType1, Object>> clazz) {
super(clazz);
}
public GetSessionRequest(Client client) {
super(/*What should I pass here. I can't pass Map.class*/);
mClient = client;
}
@Override
public Map<ClassType1, Object> loadDataFromNetwork() throws Exception {
Map<ClassType1, Object> map = mClient.getSession();
return map;
}
}