假设我有这样的课程:
class Bean
private int[] deliveryOption;
public Bean() {
deliveryOption = new int[3];
}
public int getDeliveryOption(int index) {
return deliveryOption[index];
}
public void setDeliveryOption(int index, int deliveryOption) {
this.deliveryOption[index] = deliveryOption;
}
}
当我使用 BeanUtils 或 PropertyUtils describe 方法时,地图中不会返回此属性。如何发现一个类具有索引属性?
TIA