Class JythonRealizableFunction

java.lang.Object
nz.org.riskscape.engine.function.UserDefinedFunction
nz.org.riskscape.jython.JythonRealizableFunction
All Implemented Interfaces:
nz.org.riskscape.engine.rl.RealizableFunction

public class JythonRealizableFunction extends nz.org.riskscape.engine.function.UserDefinedFunction

Realizes the Jython function against the given arguments. This is mostly so that CPython (i.e. CPythonRealizableFunction and Jython behave the same way, WRT to things like error handling.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface nz.org.riskscape.engine.rl.RealizableFunction

    nz.org.riskscape.engine.rl.RealizableFunction.MetadataIdentifiedRealizableFunction
  • Constructor Summary

    Constructors
    Constructor
    Description
    JythonRealizableFunction(nz.org.riskscape.engine.function.FunctionMetadata details, nz.org.riskscape.engine.resource.Resource pythonScript, org.python.core.PyFunction pythonFunction)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    nz.org.riskscape.engine.function.IdentifiedFunction
     
    nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction>
    realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> argumentTypes)
     

    Methods inherited from class nz.org.riskscape.engine.function.UserDefinedFunction

    areArgumentsCompatible, getArgumentProblems, getDeclaredArgumentTypes, getMetadata, getScript

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JythonRealizableFunction

      public JythonRealizableFunction(nz.org.riskscape.engine.function.FunctionMetadata details, nz.org.riskscape.engine.resource.Resource pythonScript, org.python.core.PyFunction pythonFunction)
  • Method Details

    • realize

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction> realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> argumentTypes)
    • identified

      public nz.org.riskscape.engine.function.IdentifiedFunction identified()
      Overrides:
      identified in class nz.org.riskscape.engine.function.UserDefinedFunction