InjectorEmitter class

Generates .dart source code given a list of providers to bind.

NOTE: This class is stateful, and should be used once per injector.

Implemented types

Constructors

InjectorEmitter()

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

createClass() → Class
Returns the class ... { ... } for this generated injector.
createFactory() → Method
Returns the function that will return a new instance of the class.
createInjectSelfOptional() → Method
Returns the Object injectSelfOptional(...) method for the class.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
visitMeta(String className, String factoryName) → void
Implement storing meta elements of this injector, such as its name.
override
visitProvideClass(int index, TokenElement token, Expression tokenExpression, Reference type, String? constructor, List<Expression> dependencies, bool isMulti) → void
Implement providing a new instance of type, calling constructor.
override
visitProvideExisting(int index, TokenElement token, Expression tokenExpression, Reference type, Expression redirect, bool isMulti) → void
Implement redirecting to redirect when token is requested.
override
visitProvideFactory(int index, TokenElement token, Expression tokenExpression, Reference returnType, Reference function, List<Expression> dependencies, bool isMulti) → void
Implement providing token by calling function.
override
visitProvideValue(int index, TokenElement? token, Expression tokenExpression, Reference returnType, Expression value, bool isMulti) → void
Implement providing value when token is requested.
override

Operators

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