AutowireCandidateDescriptor class

Describes whether a component is eligible for autowiring.

Autowiring automatically injects dependencies into a component. This descriptor includes a flag indicating if the component is an autowire candidate, and the AutowireMode to use.
See {@macro autowire_mode}.

Example

final candidate = AutowireCandidateDescriptor(
  autowireCandidate: true,
  autowireMode: AutowireMode.BY_TYPE,
);

print(candidate.autowireCandidate); // true
print(candidate.autowireMode); // AutowireMode.BY_TYPE
Mixed-in types

Constructors

AutowireCandidateDescriptor({required bool autowireCandidate, required AutowireMode autowireMode})
Creates an AutowireCandidateDescriptor with the given autowireCandidate flag and autowireMode.

Properties

autowireCandidate bool
Whether the component is eligible for autowiring.
getter/setter pair
autowireMode AutowireMode
The AutowireMode used for this component.
See Defines strategies for automatically wiring dependencies in a system.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

equalizedProperties() List<Object?>
Mixin-style contract for value-based equality, hashCode, and toString.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
toStringOptions() ToStringOptions
override

Operators

operator ==(Object other) bool
The equality operator.
inherited