Class PythonLikeFunctionWrapper
java.lang.Object
ai.timefold.jpyinterpreter.types.wrappers.PythonLikeFunctionWrapper
- All Implemented Interfaces:
PythonLikeObject,PythonLikeFunction
A class used as a delegator to another PythonLikeFunction.
Used to handle recursion correctly when translating functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription$call(List<PythonLikeObject> positionalArguments, Map<PythonString, PythonLikeObject> namedArguments, PythonLikeObject callerInstance) Calls the function with positional arguments and named arguments.void$deleteAttribute(String attributeName) Delete an attribute by name.$getAttributeOrError(String attributeName) Gets an attribute by name.$getAttributeOrNull(String attributeName) Gets an attribute by name.$getType()Returns the type describing the object$method$__delattr__(PythonString pythonName) $method$__eq__(PythonLikeObject other) $method$__format__(PythonLikeObject formatString) $method$__getattribute__(PythonString pythonName) $method$__ne__(PythonLikeObject other) $method$__setattr__(PythonString pythonName, PythonLikeObject value) void$setAttribute(String attributeName, PythonLikeObject value) Sets an attribute by name.voidsetWrapped(PythonLikeFunction wrapped) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.timefold.jpyinterpreter.PythonLikeObject
$getGenericType
-
Constructor Details
-
PythonLikeFunctionWrapper
public PythonLikeFunctionWrapper()
-
-
Method Details
-
getWrapped
-
setWrapped
-
$call
public PythonLikeObject $call(List<PythonLikeObject> positionalArguments, Map<PythonString, PythonLikeObject> namedArguments, PythonLikeObject callerInstance) Description copied from interface:PythonLikeFunctionCalls the function with positional arguments and named arguments.- Specified by:
$callin interfacePythonLikeFunction- 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 interfacePythonLikeFunction- Specified by:
$getAttributeOrNullin interfacePythonLikeObject- Parameters:
attributeName- Name of the attribute to get- Returns:
- The attribute of the object that corresponds with attributeName
-
$getAttributeOrError
Description copied from interface:PythonLikeObjectGets an attribute by name.- Specified by:
$getAttributeOrErrorin 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 interfacePythonLikeFunction- 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 interfacePythonLikeFunction- 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 interfacePythonLikeFunction- Specified by:
$getTypein interfacePythonLikeObject- Returns:
- the type describing the object
-
$method$__getattribute__
- Specified by:
$method$__getattribute__in interfacePythonLikeObject
-
$method$__setattr__
- Specified by:
$method$__setattr__in interfacePythonLikeObject
-
$method$__delattr__
- Specified by:
$method$__delattr__in interfacePythonLikeObject
-
$method$__eq__
- Specified by:
$method$__eq__in interfacePythonLikeObject
-
$method$__ne__
- Specified by:
$method$__ne__in interfacePythonLikeObject
-
$method$__str__
- Specified by:
$method$__str__in interfacePythonLikeObject
-
$method$__repr__
- Specified by:
$method$__repr__in interfacePythonLikeObject
-
$method$__format__
- Specified by:
$method$__format__in interfacePythonLikeObject
-
$method$__format__
- Specified by:
$method$__format__in interfacePythonLikeObject
-
$method$__hash__
- Specified by:
$method$__hash__in interfacePythonLikeObject
-