for(AbstractResponse resp : responseList) {
if (resp instanceof AResponse) {
AResponse areponse = (AResponse)resp;
//1
//2
//3
}else if (resp instanceof BResponse) {
BResponse breponse = (BResponse)resp;
//1
//2
//3
}else if (resp instanceof CResponse) {
CResponse creponse = (CResponse)resp;
//1
//2
//3
}
}
不好意思,刚才写错了,修改了一下