Package org.opensearch.common.inject.spi
Class DefaultBindingScopingVisitor<V>
java.lang.Object
org.opensearch.common.inject.spi.DefaultBindingScopingVisitor<V>
- Type Parameters:
V
- any type to be returned by the visit method. UseVoid
withreturn null
if no return type is needed.
- All Implemented Interfaces:
BindingScopingVisitor<V>
No-op visitor for subclassing. All interface methods simply delegate to
visitOther()
, returning its result.- Since:
- 2.0
- Opensearch.internal:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionVisit an eager singleton or single instance.Visit an unspecified or unscoped strategy.protected V
Default visit implementation.visitScope
(Scope scope) Visit a scope instance.visitScopeAnnotation
(Class<? extends Annotation> scopeAnnotation) Visit a scope annotation.
-
Constructor Details
-
DefaultBindingScopingVisitor
public DefaultBindingScopingVisitor()
-
-
Method Details
-
visitOther
Default visit implementation. Returnsnull
. -
visitEagerSingleton
Description copied from interface:BindingScopingVisitor
Visit an eager singleton or single instance. This scope strategy is found on both module and injector bindings.- Specified by:
visitEagerSingleton
in interfaceBindingScopingVisitor<V>
-
visitScope
Description copied from interface:BindingScopingVisitor
Visit a scope instance. This scope strategy is found on both module and injector bindings.- Specified by:
visitScope
in interfaceBindingScopingVisitor<V>
-
visitScopeAnnotation
Description copied from interface:BindingScopingVisitor
Visit a scope annotation. This scope strategy is found only on module bindings. The instance that implements this scope is registered byBinder.bindScope()
.- Specified by:
visitScopeAnnotation
in interfaceBindingScopingVisitor<V>
-
visitNoScoping
Description copied from interface:BindingScopingVisitor
Visit an unspecified or unscoped strategy. On a module, this strategy indicates that the injector should use scoping annotations to find a scope. On an injector, it indicates that no scope is applied to the binding. An unscoped binding will behave like a scoped one when it is linked to a scoped binding.- Specified by:
visitNoScoping
in interfaceBindingScopingVisitor<V>
-