this.condition = conditionStr;
this.name = name;
}
protected boolean checkCondition(RaptorJSEnv jsEnv, ScriptableObject extensionCollection) {
JavaScriptEngine jsEngine = jsEnv.getJavaScriptEngine();
if (this.function == null) {
this.function = (NativeFunction)jsEngine.eval(
"(function (extensions) { return " + this.condition + ";})",
this.name);
}
Boolean result = (Boolean)jsEngine.invokeFunction(this.function, extensionCollection);
return result.booleanValue();
}