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

org.nutz.el.obj.AbstractObj Maven / Gradle / Ivy

Go to download

Nutz, which is a collections of lightweight frameworks, each of them can be used independently

There is a newer version: 1.r.72
Show newest version
package org.nutz.el.obj;

import org.nutz.el.ElCache;
import org.nutz.lang.util.Context;

/**
 * 对象
 * @author juqkai([email protected])
 */
public class AbstractObj implements Elobj{
    private String val;
    private ElCache ec;
    public AbstractObj(String val) {
        this.val = val;
    }
    public String getVal() {
        return val;
    }
    public Object fetchVal(){
        Context context = ec.getContext();
        if(context != null && context.has(val)){
            return context.get(val);
        }
        return null;
    }
    public String toString() {
        return val;
    }
    public void setEc(ElCache ec) {
        this.ec = ec;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy