Class DefaultBindingScopingVisitor<V>

  • Type Parameters:
    V - any type to be returned by the visit method. Use Void with return null if no return type is needed.
    All Implemented Interfaces:

    public class DefaultBindingScopingVisitor<V>
    extends java.lang.Object
    implements BindingScopingVisitor<V>
    No-op visitor for subclassing. All interface methods simply delegate to visitOther(), returning its result.
    • Method Summary

      Modifier and Type Method Description
      V visitEagerSingleton()
      Visit an eager singleton or single instance.
      V visitNoScoping()
      Visit an unspecified or unscoped strategy.
      protected V visitOther()
      Default visit implementation.
      V visitScope​(Scope scope)
      Visit a scope instance.
      V visitScopeAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation)
      Visit a scope annotation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultBindingScopingVisitor

        public DefaultBindingScopingVisitor()
    • Method Detail

      • visitOther

        protected V visitOther()
        Default visit implementation. Returns null.
      • visitScopeAnnotation

        public V visitScopeAnnotation​(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation)
        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 by Binder.bindScope().
        Specified by:
        visitScopeAnnotation in interface BindingScopingVisitor<V>
      • visitNoScoping

        public 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 interface BindingScopingVisitor<V>