try {
f = JythonScriptEngine.getFunction(filename, functionName);
this.function = f;
num_parameters = ((PyBaseCode) f.func_code).co_argcount;
PyObject outputSchemaDef = f.__findattr__("outputSchema".intern());
if (outputSchemaDef != null) {
this.schema = Utils.getSchemaFromString(outputSchemaDef.toString());
found = true;
}
PyObject outputSchemaFunctionDef = f.__findattr__("outputSchemaFunction".intern());
if (outputSchemaFunctionDef != null) {
if(found) {
throw new ExecException(
"multiple decorators for " + functionName);
}
scriptFilePath = filename;
outputSchemaFunc = outputSchemaFunctionDef.toString();
this.schema = null;
found = true;
}
PyObject schemaFunctionDef = f.__findattr__("schemaFunction".intern());
if (schemaFunctionDef != null) {
if(found) {
throw new ExecException(
"multiple decorators for " + functionName);
}