All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.k7g.alloy.ioc.provide.LinkDataProvide Maven / Gradle / Ivy

package cn.k7g.alloy.ioc.provide;

import cn.k7g.alloy.expose.DataProvider;
import cn.k7g.alloy.mold.var.AbsVar;
import cn.k7g.alloy.mold.var.ConstVar;
import cn.k7g.alloy.mold.var.LinkVar;
import org.springframework.stereotype.Component;

/**
 * 链接数据
 * @author victor-wu
 * @date 2021/9/27 下午1:10
 */
@Component
public final class LinkDataProvide implements DataProvider {
    @Override
    public boolean supports(AbsVar var) {
        return var instanceof LinkVar;
    }

    @Override
    public String get(AbsVar var) {
        LinkVar lv = (LinkVar) var;
        return String.format("%s", var.getFirstParam(), lv.getText());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy