@FunctionalInterface public interface Scope
| 限定符和类型 | 方法和说明 |
|---|---|
default <T> Supplier<T> |
chainScope(Object key,
Scope[] scopeChain,
int start,
int end,
Supplier<T> provider)
构造一个Scope链,使一个对象的创建可以同时贯穿多个Scope。
|
default <T> Supplier<T> |
chainScope(Object key,
Scope[] scopeChain,
Supplier<T> provider)
构造一个Scope链,使一个对象的创建可以同时贯穿多个Scope。
|
default <T> Supplier<T> |
chainScope(Object key,
Scope secondScope,
Supplier<T> provider)
构造一个Scope链,使一个对象的创建可以同时贯穿两个Scope。
|
<T> Supplier<T> |
scope(Object key,
Supplier<T> provider)
加入作用域
|
<T> Supplier<T> scope(Object key, Supplier<T> provider)
key - 加入作用域的key。provider - 对象 Provider。default <T> Supplier<T> chainScope(Object key, Scope secondScope, Supplier<T> provider)
如果对象的创建满足这两个 Scope 的要求,那么对象会被这两个 Scope 同时缓存。
key - 加入作用域的key。secondScope - 第二作用域provider - 对象 Provider。chainScope(Object, Scope[], Supplier),
chainScope(Object, Scope[], int, int, Supplier)default <T> Supplier<T> chainScope(Object key, Scope[] scopeChain, Supplier<T> provider)
scopeChain 中的 Scope 如果被创建的对象满足其缓存的要求那么会被缓存。
key - 加入作用域的key。scopeChain - 作用域链provider - 对象 Provider。chainScope(Object, Scope, Supplier),
chainScope(Object, Scope[], int, int, Supplier)default <T> Supplier<T> chainScope(Object key, Scope[] scopeChain, int start, int end, Supplier<T> provider)
scopeChain 中的 Scope 如果被创建的对象满足其缓存的要求那么会被缓存。
key - 加入作用域的key。scopeChain - 作用域链start - scopeChain 开始位置。end - scopeChain 结束位置。provider - 对象 Provider。chainScope(Object, Scope, Supplier),
chainScope(Object, Scope[], Supplier)Copyright © 2022. All rights reserved.