use of org.mvel2.integration.VariableResolver in project mvel by mikebrock.
the class PostFixIncNode method getReducedValueAccelerated.
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
VariableResolver vResolver = factory.getVariableResolver(name);
vResolver.setValue(MathProcessor.doOperations(ctx = vResolver.getValue(), Operator.ADD, DataTypes.INTEGER, 1));
return ctx;
}
use of org.mvel2.integration.VariableResolver in project mvel by mikebrock.
the class PreFixDecNode method getReducedValueAccelerated.
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
VariableResolver vResolver = factory.getVariableResolver(name);
vResolver.setValue(ctx = MathProcessor.doOperations(vResolver.getValue(), Operator.SUB, DataTypes.INTEGER, 1));
return ctx;
}
use of org.mvel2.integration.VariableResolver in project mvel by mikebrock.
the class PreFixIncNode method getReducedValueAccelerated.
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
VariableResolver vResolver = factory.getVariableResolver(name);
vResolver.setValue(ctx = MathProcessor.doOperations(vResolver.getValue(), Operator.ADD, DataTypes.INTEGER, 1));
return ctx;
}
use of org.mvel2.integration.VariableResolver in project mvel by mikebrock.
the class IndexedPostFixDecNode method getReducedValueAccelerated.
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
VariableResolver vResolver = factory.getIndexedVariableResolver(register);
// ctx = vResolver.getValue();
vResolver.setValue(MathProcessor.doOperations(ParseTools.resolveType(ctx = vResolver.getValue()), ctx, Operator.SUB, DataTypes.INTEGER, 1));
return ctx;
}
use of org.mvel2.integration.VariableResolver in project mvel by mikebrock.
the class FunctionVariableResolverFactory method createVariable.
public VariableResolver createVariable(String name, Object value) {
VariableResolver resolver = getVariableResolver(name);
if (resolver == null) {
int idx = increaseRegisterTableSize();
this.indexedVariableNames[idx] = name;
this.indexedVariableResolvers[idx] = new SimpleValueResolver(value);
variableResolvers.put(name, null);
// variableResolvers.put(name, this.indexedVariableResolvers[idx] = new SimpleValueResolver(value));
return this.indexedVariableResolvers[idx];
} else {
resolver.setValue(value);
return resolver;
}
}
Aggregations