Record Class ArgumentsDef
java.lang.Object
java.lang.Record
io.micronaut.python.processing.visitor.ArgumentsDef
- Record Components:
arguments- The list of function arguments.declaringFunction- The function that declares these arguments.
public record ArgumentsDef(List<ArgumentDef> arguments, FunctionDef declaringFunction)
extends Record
An ArgumentsDef represents the complete argument specification for a function.
This record contains all parameters of a Python function including their names, type annotations, and default values.
- Since:
- 5.2.0
- Author:
- Micronaut Team
-
Constructor Summary
ConstructorsConstructorDescriptionArgumentsDef(List<ArgumentDef> arguments, FunctionDef declaringFunction) Creates an instance of aArgumentsDefrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentsrecord component.Returns the value of thedeclaringFunctionrecord component.static ArgumentsDefempty()Creates an ArgumentsDef with an empty argument list.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.static ArgumentsDefDeprecated.static ArgumentsDefof(List<ArgumentDef> arguments) Creates an ArgumentsDef from a list of arguments.static ArgumentsDefof(List<ArgumentDef> arguments, FunctionDef declaringFunction) Creates an ArgumentsDef from a list of arguments with a declaring function.final StringtoString()Returns a string representation of this record class.withDeclaringFunction(FunctionDef declaringFunction) Creates a new ArgumentsDef with the given declaring function.
-
Constructor Details
-
ArgumentsDef
Creates an instance of aArgumentsDefrecord class.- Parameters:
arguments- the value for theargumentsrecord componentdeclaringFunction- the value for thedeclaringFunctionrecord component
-
-
Method Details
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
-
empty
Creates an ArgumentsDef with an empty argument list.- Returns:
- A new ArgumentsDef with no arguments
-
of
Creates an ArgumentsDef from a list of arguments.- Parameters:
arguments- The argument list- Returns:
- A new ArgumentsDef
-
of
Creates an ArgumentsDef from a list of arguments with a declaring function.- Parameters:
arguments- The argument listdeclaringFunction- The function that declares these arguments- Returns:
- A new ArgumentsDef
-
of
Deprecated.Useof(List)insteadCreates an ArgumentsDef from a list of arguments (backward compatibility).- Parameters:
arguments- The argument list- Returns:
- A new ArgumentsDef
-
withDeclaringFunction
Creates a new ArgumentsDef with the given declaring function.- Parameters:
declaringFunction- The function that declares these arguments- Returns:
- A new ArgumentsDef with the declaring function set and propagated to arguments
-
toString
-
arguments
-
declaringFunction
Returns the value of thedeclaringFunctionrecord component.- Returns:
- the value of the
declaringFunctionrecord component
-
of(List)instead