Class PythonCompiledFunction

java.lang.Object
ai.timefold.jpyinterpreter.PythonCompiledFunction

public class PythonCompiledFunction extends Object
  • Field Details

    • module

      public String module
      The module where the function was defined.
    • moduleFilePath

      public String moduleFilePath
      The path to the file that defines the module.
    • qualifiedName

      public String qualifiedName
      The qualified name of the function. Does not include module.
    • instructionList

      public List<PythonBytecodeInstruction> instructionList
      List of bytecode instructions in the function
    • closure

      public PythonLikeTuple closure
      The closure of the function
    • globalsMap

      public Map<String,PythonLikeObject> globalsMap
      The globals of the function
    • typeAnnotations

      public Map<String,TypeHint> typeAnnotations
      Type annotations for the parameters and return. (return is stored under the "return" key).
    • defaultPositionalArguments

      public PythonLikeTuple defaultPositionalArguments
      Default positional arguments
    • defaultKeywordArguments

      public PythonLikeDict defaultKeywordArguments
      Default keyword arguments
    • co_names

      public List<String> co_names
      List of all names used in the function
    • co_varnames

      public List<String> co_varnames
      List of names used by local variables in the function
    • co_cellvars

      public List<String> co_cellvars
      List of names used by cell variables
    • co_freevars

      public List<String> co_freevars
      List of names used by free variables
    • co_constants

      public List<PythonLikeObject> co_constants
      List of constants used in bytecode
    • co_exceptiontable

      public PythonExceptionTable 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_argcount
      The number of not keyword only arguments the function takes
    • co_kwonlyargcount

      public int co_kwonlyargcount
      The number of keyword only arguments the function takes
    • co_posonlyargcount

      public int co_posonlyargcount
      The number of positional only arguments the function takes
    • supportExtraPositionalArgs

      public boolean supportExtraPositionalArgs
      True if the python function can take extra positional arguments that were not specified in its arguments
    • supportExtraKeywordsArgs

      public boolean supportExtraKeywordsArgs
      True if the python function can take extra keyword arguments that were not specified in its arguments
    • pythonVersion

      public PythonVersion pythonVersion
      The python version this function was compiled in (see sys.hexversion)
    • methodKind

  • Constructor Details

    • PythonCompiledFunction

      public PythonCompiledFunction()
  • Method Details