src/org/nutz/dao/TableName.java
public static String render(Segment tableName) {
        Object obj = get();
        if (null == obj || !tableName.hasKey())
            return tableName.toString();

        Context context = Lang.context();
        if (isPrimitive(obj)) {
            for (String key : tableName.keys())
                context.set(key, obj);
        } else if (obj instanceof Context) {
            for (String key : tableName.keys())
                context.set(key, ((Context) obj).get(key));
        } else if (obj instanceof Map<?, ?>) {
            for (String key : tableName.keys())
                context.set(key, ((Map<?, ?>) obj).get(key));
        } else {
            Mirror<?> mirror = Mirror.me(obj);
            for (String key : tableName.keys())
                context.set(key, mirror.getValue(obj, key));
        }
        return tableName.render(context).toString();
    }
public static String render(Segment tableName) {
        Object obj = get();
        if (null == obj || !tableName.hasKey())
            return tableName.toString();

        Context context = Lang.context();
        if (isPrimitive(obj)) {
            for (String key : tableName.keys())
                context.set(key, obj);
        } else if (obj instanceof Context) {
            for (String key : tableName.keys())
                context.set(key, ((Context) obj).get(key));
        } else if (obj instanceof Map<?, ?>) {
            for (String key : tableName.keys())
                context.set(key, ((Map<?, ?>) obj).get(key));
        } else {
            Mirror<?> mirror = Mirror.me(obj);
            for (String key : tableName.keys())
                context.set(key, mirror.getValue(obj, key));
        }
        return tableName.render(context).toString();
    }
根据当前线程的参考对象，渲染一个动态表名

@param tableName
动态表名
@return 渲染后的表名