org.mvel2.optimizers.impl.refl.nodes.Notify Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mvel2 Show documentation
Show all versions of mvel2 Show documentation
MVEL is a powerful expression language for Java-based applications.
It provides a plethora of features and is suited for everything
from the smallest property binding and extraction, to full blown scripts.
package org.mvel2.optimizers.impl.refl.nodes;
import org.mvel2.compiler.AccessorNode;
import org.mvel2.integration.GlobalListenerFactory;
import org.mvel2.integration.VariableResolverFactory;
public class Notify implements AccessorNode {
private String name;
private AccessorNode nextNode;
public Notify(String name) {
this.name = name;
}
public Object getValue(Object ctx, Object elCtx, VariableResolverFactory vrf) {
GlobalListenerFactory.notifyGetListeners(ctx, name, vrf);
return nextNode.getValue(ctx, elCtx, vrf);
}
public Object setValue(Object ctx, Object elCtx, VariableResolverFactory variableFactory, Object value) {
GlobalListenerFactory.notifySetListeners(ctx, name, variableFactory, value);
return nextNode.setValue(ctx, elCtx, variableFactory, value);
}
public AccessorNode getNextNode() {
return nextNode;
}
public AccessorNode setNextNode(AccessorNode nextNode) {
return this.nextNode = nextNode;
}
public Class getKnownEgressType() {
return Object.class;
}
}