Code example for Field

Methods: getAnnotation, getName

0
        return field.getName();
    } 
 
    public static String getForeignColumnNameByField(Field field) {
 
        Foreign foreign = field.getAnnotation(Foreign.class);
        if (foreign != null) {
            return foreign.foreign();
        } 
 
        return field.getName();
    } 
 
    public static Object getColumnDefaultValue(Field field) {
        Column column = field.getAnnotation(Column.class);
        if (column != null && !TextUtils.isEmpty(column.defaultValue())) {
            return valueStr2SimpleTypeFieldValue(field.getType(), column.defaultValue());
        } 
        return null; 
    }