org.mvel2.integration.impl.StackDelimiterResolverFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tbel Show documentation
Show all versions of tbel Show documentation
TBEL is a powerful expression language for ThingsBoard platform user-defined functions.
Original implementation is based on MVEL.
package org.mvel2.integration.impl;
import org.mvel2.integration.VariableResolver;
import org.mvel2.integration.VariableResolverFactory;
import java.util.Set;
/**
* @author Mike Brock
*/
public class StackDelimiterResolverFactory extends StackDemarcResolverFactory {
public StackDelimiterResolverFactory(VariableResolverFactory delegate) {
super(delegate);
}
public VariableResolver createVariable(String name, Object value) {
VariableResolverFactory delegate = getDelegate();
VariableResolverFactory nextFactory = delegate.getNextFactory();
delegate.setNextFactory(null);
VariableResolver resolver = delegate.createVariable(name, value);
delegate.setNextFactory(nextFactory);
return resolver;
}
}