CarburetorFactoryMethod class
Marks a constructor or factory method to be used for dependency instantiation instead of the default constructor.
By default, Carburetor uses the default constructor to create instances of annotated classes. Apply CarburetorFactoryMethod to a named constructor, factory constructor, or static factory method to override this behavior.
All parameters required by the annotated constructor or method will be automatically resolved and injected by Carburetor at build time.
Only one CarburetorFactoryMethod annotation may be applied per class. If multiple constructors or methods are annotated, the build will fail.
- Annotations
-
- @Target.new({TargetKind.constructor, TargetKind.method})
Constructors
- CarburetorFactoryMethod()
-
Creates a CarburetorFactoryMethod annotation.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited