ParameterElementImpl class
Implementation for ParameterElement.
- Inheritance
-
- Object
- ElementImpl
- VariableElementImpl
- ParameterElementImpl
- Implemented types
Constructors
- ParameterElementImpl.new({required String name, required Element enclosingElement, required bool hasImplicitType, required bool isConst, required bool isFinal, required bool isLate, required bool isCovariant, required bool isInitializingFormal, required bool isNamed, required bool isOptional, required bool isOptionalNamed, required bool isOptionalPositional, required bool isPositional, required bool isRequired, required bool isRequiredPositional, required bool isRequiredNamed, required bool isSuperFormal, DartType? type})
- Creates an instance of ParameterElementImpl.
Properties
- codeLength → int
-
The length of the code of this element in the file that contains the
no setterinherited
- codeOffset → int
-
The offset of the code of this element in the file that contains the
no setterinherited
- constantValue → Constant?
-
The constant value of the variable, or
null
if the variable does not have a constant value.no setterinherited - constantValueCompute ↔ ConstantValueCompute?
-
The compute function to calculate the constant value.
getter/setter pairinherited
- defaultValueCode → String?
-
The default value code for this parameter, or
null
if this parameter does not have a default value.no setteroverride - didResolveMetadata ↔ bool
-
Whether the metadata of this element has been resolved.
getter/setter pairinherited
- documentationComment ↔ String?
-
The documentation comment associated with this element if it has one.
getter/setter pairinherited
- enclosingElement → Element
-
The enclosing element of this element.
finalinherited
- hasAlwaysThrows → bool
-
Whether the element has an annotation of the form
@alwaysThrows
.no setterinherited - hasDefaultValue → bool
-
Whether this parameter has a default value.
no setteroverride
- hasDeprecated → bool
-
Whether the element has an annotation of the form
@deprecated
or@Deprecated('..')
.no setterinherited - hasDoNotStore → bool
-
Whether the element has an annotation of the form
@doNotStore
.no setterinherited - hasFactory → bool
-
Whether the element has an annotation of the form
@factory
.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- hasImplicitType → bool
-
Whether the variable has an implicit type.
finalinherited
- hasInitializer → bool
-
Whether the variable has an initializer.
no setterinherited
- hasInternal → bool
-
Whether the element has an annotation of the form
@internal
.no setterinherited - hasIsTest → bool
-
Whether the element has an annotation of the form
@isTest
.no setterinherited - hasIsTestGroup → bool
-
Whether the element has an annotation of the form
@isTestGroup
.no setterinherited - hasLiteral → bool
-
Whether the element has an annotation of the form
@literal
.no setterinherited - hasMustBeOverridden → bool
-
Whether the element has an annotation of the form
@mustBeOverridden
.no setterinherited - hasMustCallSuper → bool
-
Whether the element has an annotation of the form
@mustCallSuper
.no setterinherited - hasNonVirtual → bool
-
Whether the element has an annotation of the form
@nonVirtual
.no setterinherited - hasOptionalTypeArgs → bool
-
Whether the element has an annotation of the form
@optionalTypeArgs
.no setterinherited - hasOverride → bool
-
Whether the element has an annotation of the form
@override
.no setterinherited - hasProtected → bool
-
Whether the element has an annotation of the form
@protected
.no setterinherited - hasRedeclare → bool
-
Whether the element has an annotation of the form
@redeclare
.no setterinherited - hasReopen → bool
-
Whether the element has an annotation of the form
@reopen
.no setterinherited - hasRequired → bool
-
Whether the element has an annotation of the form
@required
.no setterinherited - hasSealed → bool
-
Whether the element has an annotation of the form
@sealed
.no setterinherited - hasUseResult → bool
-
Whether the element has an annotation of the form
@useResult
or@UseResult('..')
.no setterinherited - hasVisibleForOverriding → bool
-
Whether the element has an annotation of the form
@visibleForOverriding
.no setterinherited - identifier → String
-
A String that uniquely identifies this element
no setterinherited
- initializer ↔ Expression?
-
The initializer of the variable, or
null
if the variable does not have an initializer.getter/setter pairinherited - isConst → bool
-
Whether the variable is a constant.
finalinherited
- isCovariant → bool
-
Whether this parameter is covariant.
final
- isFinal → bool
-
Whether the variable is final.
finalinherited
- isInitializingFormal → bool
-
Whether this parameter is an initializing formal.
final
- isLate → bool
-
Whether the variable is late.
finalinherited
- isNamed → bool
-
Whether this parameter is named.
final
- isOptional → bool
-
Whether this parameter is optional.
final
- isOptionalNamed → bool
-
Whether this parameter is optional and named.
final
- isOptionalPositional → bool
-
Whether this parameter is optional and positional.
final
- isPositional → bool
-
Whether this parameter is positional.
final
- isPrivate → bool
-
Whether the name of this element starts with an underscore.
no setterinherited
- isPublic → bool
-
Whether the name of this element does not start with an underscore.
no setterinherited
- isRequired → bool
-
Whether this parameter is required.
final
- isRequiredNamed → bool
-
Whether this parameter is required and named.
final
- isRequiredPositional → bool
-
Whether this parameter is required and positional.
final
- isStatic → bool
-
Whether the variable is static.
finalinherited
- isSuperFormal → bool
-
Whether this parameter is a super formal.
final
- library → LibraryElement
-
The library that contains this element.
no setteroverride
- librarySrc → Asset
-
The source code location of this element.
no setterinherited
-
metadata
→ List<
ElementAnnotation> -
The metadata associated with this element.
no setterinherited
- metadataResolveCallback ↔ void Function()?
-
Callback to resolve metadata.
getter/setter pairinherited
- name → String
-
The name of the element.
finalinherited
- nameLength → int
-
The length of the name of this element in the file that contains the
declaration of this element, or
0
if this element does not have a name.no setterinherited - nameOffset → int
-
The offset of the name of this element in the file that contains the
declaration of this element, or
-1
if this element is synthetic, does not have a name, or otherwise does not have an offset.no setterinherited -
parameters
→ List<
ParameterElement> -
The parameters of this parameter.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → String?
-
The source code of this element.
no setterinherited
- type ↔ DartType
-
The type of the variable.
getter/setter pairinherited
-
typeParameters
→ List<
TypeParameterType> -
The type parameters of this parameter.
no setteroverride
Methods
-
addMetadata(
ElementAnnotation annotation) → void -
Adds a metadata annotation to this element.
inherited
-
changeKind(
{bool? isNamed, bool? isOptional, bool? isPositional, bool? isRequired, bool? isRequiredPositional, bool? isRequiredNamed, bool? isOptionalNamed, bool? isOptionalPositional}) → ParameterElementImpl - Creates a new ParameterElementImpl with the specified changes.
-
getAnnotation(
String name) → ElementAnnotation? -
Returns the first annotation with the given name, or null if no such
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setCodeRange(
AstNode? node, int offset, int length) → void -
Sets the code range for this element.
inherited
-
setConstantComputeValue(
ConstantValueCompute? constantValueCompute) → void -
Sets the compute function to calculate the constant value.
inherited
-
setNameRange(
int offset, int length) → void -
Sets the name range for this element.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited