为什么Column不用强转,而Table要?
Table t = (Table)c.getAnnotation(Table.class);
String tableName = t.value();
sb.append("select*from").append(tableName).append("where 1=1");
//3.遍历所有的字段
Field[] fArray = c.getDeclaredFields();
for (Field field : fArray) {
//4.处理每个字段对应的值
//4.1获取字段的名
boolean fExists = field.isAnnotationPresent(Column.class);
if(!fExists) {
continue;
}
Column column = field.getAnnotation(Column.class);
为什么Table t = (Table)c.getAnnotation(Table.class)要强转成Table,而Column column = field.getAnnotation(Column.class)就不用强转为Column?