org.gramar.base.function.IsVariableDefinedFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gramar Show documentation
Show all versions of gramar Show documentation
A lightweght, pure-Java component that makes composite software architecture design patterns extremely consumable through code generation.
The newest version!
package org.gramar.base.function;
import java.util.List;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
import org.gramar.function.GramarFunction;
import org.gramar.function.IGramarFunction;
public class IsVariableDefinedFunction extends GramarFunction implements XPathFunction, IGramarFunction {
public IsVariableDefinedFunction() {
super();
}
@Override
public Object evaluate(List args) throws XPathFunctionException {
String variableName = asStringArg(args.get(0));
return context.getVariable(variableName) != null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy