Package ai.timefold.jpyinterpreter.types
Interface PythonLikeFunction
- All Superinterfaces:
PythonLikeObject
- All Known Implementing Classes:
BinaryDunderBuiltin,BoundPythonLikeFunction,CPythonBackedPythonLikeObject,CPythonType,GeneratedFunctionMethodReference,JavaMethodReference,MultiDispatchJavaMethodReference,PythonKnownFunctionType,PythonLikeFunctionWrapper,PythonLikeGenericType,PythonLikeType,PythonObjectWrapper,TernaryDunderBuiltin,UnaryDunderBuiltin
-
Method Summary
Modifier and TypeMethodDescription$call(List<PythonLikeObject> positionalArguments, Map<PythonString, PythonLikeObject> namedArguments, PythonLikeObject callerInstance) Calls the function with positional arguments and named arguments.default void$deleteAttribute(String attributeName) Delete an attribute by name.default PythonLikeObject$getAttributeOrNull(String attributeName) Gets an attribute by name.default PythonLikeType$getType()Returns the type describing the objectdefault void$setAttribute(String attributeName, PythonLikeObject value) Sets an attribute by name.static PythonLikeTypestatic PythonLikeTypestatic PythonLikeTypeMethods inherited from interface ai.timefold.jpyinterpreter.PythonLikeObject
$getAttributeOrError, $getGenericType, $method$__delattr__, $method$__eq__, $method$__format__, $method$__format__, $method$__getattribute__, $method$__hash__, $method$__ne__, $method$__repr__, $method$__setattr__, $method$__str__
-
Method Details
-
getStaticFunctionType
-
getFunctionType
-
getClassFunctionType
-
$call
PythonLikeObject $call(List<PythonLikeObject> positionalArguments, Map<PythonString, PythonLikeObject> namedArguments, PythonLikeObject callerInstance) Calls the function with positional arguments and named arguments.- Parameters:
positionalArguments- Positional argumentsnamedArguments- Named argumentscallerInstance- The first argument passed to the caller, if any; null otherwise (used for super)- Returns:
- The function result
-
$getAttributeOrNull
Description copied from interface:PythonLikeObjectGets an attribute by name.- Specified by:
$getAttributeOrNullin interfacePythonLikeObject- Parameters:
attributeName- Name of the attribute to get- Returns:
- The attribute of the object that corresponds with attributeName
-
$setAttribute
Description copied from interface:PythonLikeObjectSets an attribute by name.- Specified by:
$setAttributein interfacePythonLikeObject- Parameters:
attributeName- Name of the attribute to setvalue- Value to set the attribute to
-
$deleteAttribute
Description copied from interface:PythonLikeObjectDelete an attribute by name.- Specified by:
$deleteAttributein interfacePythonLikeObject- Parameters:
attributeName- Name of the attribute to delete
-
$getType
Description copied from interface:PythonLikeObjectReturns the type describing the object- Specified by:
$getTypein interfacePythonLikeObject- Returns:
- the type describing the object
-