withScope abstract method
Defines the type
of scope this pod belongs to (e.g., singleton
,
prototype
).
singleton
: one shared instance across the container.prototype
: a new instance each time it is requested.
Example
spec.withScope(ScopeType.singleton);
Implementation
Spec<T> withScope(ScopeType type);