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
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 theclass
. -
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
, callingconstructor
.override -
visitProvideExisting(
int index, TokenElement token, Expression tokenExpression, Reference type, Expression redirect, bool isMulti) → void -
Implement redirecting to
redirect
whentoken
is requested.override -
visitProvideFactory(
int index, TokenElement token, Expression tokenExpression, Reference returnType, Reference function, List< Expression> dependencies, bool isMulti) → void -
Implement providing
token
by callingfunction
.override -
visitProvideValue(
int index, TokenElement? token, Expression tokenExpression, Reference returnType, Expression value, bool isMulti) → void -
Implement providing
value
whentoken
is requested.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited