Package nz.org.riskscape.cpython
Class CPythonFunctionFramework
java.lang.Object
nz.org.riskscape.cpython.CPythonFunctionFramework
- All Implemented Interfaces:
nz.org.riskscape.engine.function.FunctionFramework,nz.org.riskscape.engine.function.FunctionFrameworkSupport,nz.org.riskscape.engine.Identified
public class CPythonFunctionFramework
extends Object
implements nz.org.riskscape.engine.function.FunctionFramework, nz.org.riskscape.engine.function.FunctionFrameworkSupport
Framework for running a python function natively in CPython (as opposed to JythonFunctionFramework in nz.org.riskscape.jython) which executes the user's python code in Jython).
-
Field Summary
Fields inherited from interface nz.org.riskscape.engine.function.FunctionFramework
DEFAULT_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.IdentifiedFunction>build(String functionName, nz.org.riskscape.engine.Project project, nz.org.riskscape.engine.bind.BoundParameters bound) booleanfindUnsupportedTypes(nz.org.riskscape.engine.types.TypeRegistry registry, nz.org.riskscape.engine.types.Type type, List<Class<? extends nz.org.riskscape.engine.types.Type>> allowedTypes) Returns a list of any types we don't support with CPython.getId()nz.org.riskscape.engine.bind.JavaParameterSet<nz.org.riskscape.engine.function.MetadataParams>intgetSupportedArgumentTypeNames(nz.org.riskscape.engine.types.TypeRegistry registry) static CPythonFunctionFrameworkMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.function.FunctionFrameworkSupport
loadFunctionFromParamsMethods inherited from interface nz.org.riskscape.engine.Identified
getIdentifiedClass
-
Constructor Details
-
CPythonFunctionFramework
-
-
Method Details
-
notEnabled
- Returns:
- a special cpython function framework which won't claim .py files and will always return an error on build
-
build
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.IdentifiedFunction> build(String functionName, nz.org.riskscape.engine.Project project, nz.org.riskscape.engine.bind.BoundParameters bound) - Specified by:
buildin interfacenz.org.riskscape.engine.function.FunctionFramework
-
canBuild
- Specified by:
canBuildin interfacenz.org.riskscape.engine.function.FunctionFramework
-
findUnsupportedTypes
public static List<String> findUnsupportedTypes(nz.org.riskscape.engine.types.TypeRegistry registry, nz.org.riskscape.engine.types.Type type, List<Class<? extends nz.org.riskscape.engine.types.Type>> allowedTypes) Returns a list of any types we don't support with CPython.
-
getSupportedArgumentTypeNames
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfacenz.org.riskscape.engine.function.FunctionFramework
-
getId
- Specified by:
getIdin interfacenz.org.riskscape.engine.Identified
-
getParameterSet
public nz.org.riskscape.engine.bind.JavaParameterSet<nz.org.riskscape.engine.function.MetadataParams> getParameterSet()- Specified by:
getParameterSetin interfacenz.org.riskscape.engine.function.FunctionFramework
-