Parameter class final
Reference: https://docs.python.org/3/library/inspect.html#inspect.Parameter
Python class definition for the Parameter class. This is hand-crafted and not generated. Thus it only contains a subset of the actual class.
It also contains some helper methods for Dart.
Constructors
-
Parameter.from(PythonClassInterface<
PythonFfiDelegate< classDelegate)Object?> , Object?> - Wraps a Python object with the Parameter class definition.
Properties
- annotation → Object?
-
The annotation for the parameter. If the parameter has no annotation,
this attribute is set to Parameter.empty.
no setter
- default_ → Object?
-
The default value for the parameter. If the parameter has no default
value, this attribute is set to Parameter.empty.
no setter
- defaultString → String
-
Returns a String representation of the default value of the parameter.
Returns an empty String, if no default value is set or the parameter
kind disallows default values.
no setter
-
finalizer
→ Finalizer<
(PythonFfiDelegate< Object?> , Object?)> -
The finalizer for the python object.
Gets invoked when the object is no longer accessible to the program.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
initializer
→ Initializer<
PythonFfiDelegate< Object?> , Object?> -
The initializer for the python object.
Gets invoked at the start of the constructor.
finalinherited
- kind → ParameterKind
-
Describes how argument values are bound to the parameter. The possible
values are accessible via Parameter (like Parameter.KEYWORD_ONLY), and
support comparison and ordering, in the following order:
no setter
- name → String
-
The name of the parameter as a string. The name must be a valid Python
identifier.
no setter
-
platform
→ PythonFfiDelegate<
Object?> -
Gets the platform that this object is associated with.
no setterinherited
- reference → Object?
-
Gets the reference to the python object.
no setterinherited
- requiredString → String
-
Returns a String that can always be prepended to the parameter name.
Depending on the kind, this is either an empty String, or the
required
keyword. Returns the parameter name parameter kinds mapped to positional arguments in Dart.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sanitizedName → String
-
Prevents the parameter to be invalid in Dart.
Some parameters must not start with an underscore. To ensure this, we add
a dollar sign in front of the name, if it starts with an underscore.
no setter
Methods
-
debugDump(
) → Map< String, Object?> -
Dumps the python object to the console.
override
-
getAttribute<
T extends Object?> (String attributeName) → T -
Gets the attribute with the given name.
inherited
-
getAttributeOrNull<
T extends Object?> (String attributeName) → T? -
Gets the attribute with the given name or null if it does not exist.
inherited
-
getAttributeRaw<
T extends PythonObjectInterface< (PythonFfiDelegate< >Object?> , Object?>String attributeName) → T -
Gets the attribute with the given name.
inherited
-
getFunction(
String name) → PythonFunctionInterface< PythonFfiDelegate< Object?> , Object?> -
Gets the function with the given name.
inherited
-
getMethod(
String functionName) → PythonFunctionInterface< PythonFfiDelegate< Object?> , Object?> -
Gets a method from the class.
inherited
-
hasAttribute(
String attributeName) → bool -
Checks if the python object has the given attribute.
inherited
-
noSuchMethod(
Invocation invocation) → Object? -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAttribute<
T extends Object?> (String attributeName, T value) → void -
Sets the attribute with the given name.
inherited
-
setAttributeRaw<
T extends PythonObjectInterface< (PythonFfiDelegate< >Object?> , Object?>String attributeName, T value) → void -
Sets the attribute with the given name.
inherited
-
toDartObject(
) → Object? -
Converts the python object to a Dart object.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- empty → ReferenceEqualityWrapper
-
A special class-level marker to specify absence of default values and
annotations.
no setter
- KEYWORD_ONLY → Object?
-
Value must be supplied as a keyword argument. Keyword only parameters are
those which appear after a * or *args entry in a Python function
definition.
no setter
- POSITIONAL_ONLY → Object?
-
Value must be supplied as a positional argument. Positional only
parameters are those which appear before a / entry (if present) in a
Python function definition.
no setter
- POSITIONAL_OR_KEYWORD → Object?
-
Value may be supplied as either a keyword or positional argument (this is
the standard binding behaviour for functions implemented in Python.)
no setter
- VAR_KEYWORD → Object?
-
A dict of keyword arguments that aren’t bound to any other parameter. This
corresponds to a **kwargs parameter in a Python function definition.
no setter
- VAR_POSITIONAL → Object?
-
A tuple of positional arguments that aren’t bound to any other parameter.
This corresponds to a *args parameter in a Python function definition.
no setter