open fun getParentScope(): ScopeNode
Return
the parentScope of this scope. Can be null for a root scope.
open fun <A : Annotation> getParentScope(scopeAnnotationClass: Class<A>): ScopeNode
scopeAnnotationClass - an annotation that should be qualified by . If not, an exception is thrown.
Return
the parent ScopeNode of this scope that supports scopeAnnotationClass. The current scope (this) can be returned if it, itself, supports scopeAnnotationClass. If no such parent exists, it throws an exception. This later case means that something scoped is using a lower scoped dependency, which is conceptually flawed and not allowed in Toothpick. Note that is scopeAnnotationClass is , the root scope is always returned. Thus the Singleton scope annotation class doesn't need to be supported, it's built-in.