Package ai.timefold.jpyinterpreter
Class PythonCompiledFunction
java.lang.Object
ai.timefold.jpyinterpreter.PythonCompiledFunction
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe closure of the functionintThe number of not keyword only arguments the function takesList of names used by cell variablesList of constants used in bytecodeThe exception table; only populated in Python 3.11 and above (in Python 3.10 and below, the table will be empty, since those use explict block instructions)List of names used by free variablesintThe number of keyword only arguments the function takesList of all names used in the functionintThe number of positional only arguments the function takesList of names used by local variables in the functionDefault keyword argumentsDefault positional argumentsThe globals of the functionList of bytecode instructions in the functionThe module where the function was defined.The path to the file that defines the module.The python version this function was compiled in (see sys.hexversion)The qualified name of the function.booleanTrue if the python function can take extra keyword arguments that were not specified in its argumentsbooleanTrue if the python function can take extra positional arguments that were not specified in its argumentsType annotations for the parameters and return. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()intintThe total number of arguments the function takes
-
Field Details
-
module
The module where the function was defined. -
moduleFilePath
The path to the file that defines the module. -
qualifiedName
The qualified name of the function. Does not include module. -
instructionList
List of bytecode instructions in the function -
closure
The closure of the function -
globalsMap
The globals of the function -
typeAnnotations
Type annotations for the parameters and return. (return is stored under the "return" key). -
defaultPositionalArguments
Default positional arguments -
defaultKeywordArguments
Default keyword arguments -
co_names
List of all names used in the function -
co_varnames
List of names used by local variables in the function -
co_cellvars
List of names used by cell variables -
co_freevars
List of names used by free variables -
co_constants
List of constants used in bytecode -
co_exceptiontable
The exception table; only populated in Python 3.11 and above (in Python 3.10 and below, the table will be empty, since those use explict block instructions) -
co_argcount
public int co_argcountThe number of not keyword only arguments the function takes -
co_kwonlyargcount
public int co_kwonlyargcountThe number of keyword only arguments the function takes -
co_posonlyargcount
public int co_posonlyargcountThe number of positional only arguments the function takes -
supportExtraPositionalArgs
public boolean supportExtraPositionalArgsTrue if the python function can take extra positional arguments that were not specified in its arguments -
supportExtraKeywordsArgs
public boolean supportExtraKeywordsArgsTrue if the python function can take extra keyword arguments that were not specified in its arguments -
pythonVersion
The python version this function was compiled in (see sys.hexversion) -
methodKind
-
-
Constructor Details
-
PythonCompiledFunction
public PythonCompiledFunction()
-
-
Method Details
-
copy
-
getParameterTypes
-
getReturnType
-
getReturnTypeHint
-
getAsmMethodDescriptorString
-
getGeneratedClassBaseName
-
getArgumentSpecMapper
public BiFunction<PythonLikeTuple,PythonLikeDict, getArgumentSpecMapper()ArgumentSpec<PythonLikeObject>> -
totalArgCount
public int totalArgCount()The total number of arguments the function takes -
getFirstLine
public int getFirstLine()
-