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

org.onetwo.common.expr.SimpleVariableProvider Maven / Gradle / Ivy

There is a newer version: 4.7.2
Show newest version
package org.onetwo.common.expr;

import org.onetwo.common.log.JFishLoggerFactory;
import org.onetwo.common.utils.MyUtils;
import org.slf4j.Logger;


/*********
 * VariableSupporter到ValuProvider的适配器
 * @author way
 *
 */
public class SimpleVariableProvider implements ValueProvider {
	
	protected Logger logger = JFishLoggerFactory.getLogger(SimpleVariableProvider.class);
	
	protected Object context;

	
	public SimpleVariableProvider(Object context){
		this.context = context;
	}
	
	@Override
	public String findString(String var) {
		Object val = MyUtils.getValue(context, var);
		return val==null?null:val.toString();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy