ScopeFactory<BeanT extends Object> class final

ScopeFactory is a class that represents a Bean and its state. It is used for the registration of Beans in the DDI system.

Constructors

ScopeFactory.application({required CustomBuilder<FutureOr<BeanT>> builder, VoidCallback? postConstruct, ListDecorator<BeanT>? decorators, ListDDIInterceptor<BeanT>? interceptors, bool destroyable = true, Set<Object>? children})
Factory method that creates a Bean with the Application scope.
factory
ScopeFactory.dependent({required CustomBuilder<FutureOr<BeanT>> builder, VoidCallback? postConstruct, ListDecorator<BeanT>? decorators, ListDDIInterceptor<BeanT>? interceptors, bool destroyable = true, Set<Object>? children})
Factory method that creates a Bean with the Dependent scope.
factory
ScopeFactory.object({required BeanT instanceHolder, ListDDIInterceptor<BeanT>? interceptors, ListDecorator<BeanT>? decorators, bool destroyable = true, Set<Object>? children})
Factory method that creates a Bean with the Object scope.
factory
ScopeFactory.session({required CustomBuilder<FutureOr<BeanT>> builder, VoidCallback? postConstruct, ListDecorator<BeanT>? decorators, ListDDIInterceptor<BeanT>? interceptors, bool destroyable = true, Set<Object>? children})
Factory method that creates a Bean with the Session scope.
factory
ScopeFactory.singleton({BeanT? instanceHolder, CustomBuilder<FutureOr<BeanT>>? builder, ListDDIInterceptor<BeanT>? interceptors, bool destroyable = true, Set<Object>? children, ListDecorator<BeanT>? decorators, VoidCallback? postConstruct})
Factory method that creates a Bean with the Singleton scope.
factory

Properties

builder CustomBuilder<FutureOr<BeanT>>?
The factory builder responsible for creating the Bean.
final
children Set<Object>?
The child objects associated with the Bean, acting as a module.
getter/setter pair
decorators ↔ ListDecorator<BeanT>?
A list of decorators that are applied during the Bean creation process.
getter/setter pair
destroyable bool
A flag that indicates whether the Bean can be destroyed after its usage.
final
hashCode int
The hash code for this object.
no setterinherited
instanceHolder ↔ BeanT?
The instance of the Bean created by the factory.
getter/setter pair
interceptors ↔ ListDDIInterceptor<BeanT>?
A list of interceptors that are called at various stages of the Bean usage.
getter/setter pair
postConstruct → VoidCallback?
A callback function that is invoked after the Bean is created.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopeType → Scopes
The scope type that defines the lifecycle of the Bean (e.g., Singleton, Application, Session, etc.).
final
type Type
Returns the current Bean type.
no setter

Methods

cast<NewType extends Object>() ScopeFactory<NewType>
Casts the current ScopeFactory to a new type NewType.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register({Object? qualifier, FutureOr<bool> registerIf()?}) Future<void>
Registers the current ScopeFactory in the DDI system.
toString() String
A string representation of this object.
inherited

Operators

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