Index

A B C D E F G H I K L M N O P R S T U V 
All Classes and Interfaces|All Packages

A

after(Ticks, Runnable) - Method in interface me.kzheart.klib.scheduler.KScheduler
 
after(Ticks, Runnable) - Method in interface me.kzheart.klib.scope.Scope
 
argument(CommandArgument<T>) - Method in interface me.kzheart.klib.command.api.CommandSpec
Append one argument and return its child node for flat chaining.
argument(CommandArgument<T>, Consumer<? super CommandSpec>) - Method in interface me.kzheart.klib.command.api.CommandSpec
 
argumentColor() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
argumentColor(int) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 
async(Supplier<T>) - Method in interface me.kzheart.klib.scheduler.KScheduler
在异步线程中执行提供器,回调通过同步执行器派发。 提供器所在线程不是服务器主线程,不能在其中访问 Bukkit 状态。
async(Supplier<T>) - Method in interface me.kzheart.klib.scope.Scope
在异步线程执行提供器;结果需通过 AsyncTask.thenSync(java.util.function.Consumer<? super T>) 回到主线程后才能访问 Bukkit 状态。
AsyncTask<T> - Interface in me.kzheart.klib.scheduler
由 Scope.async 创建的异步任务,回调统一在同步执行器(Bukkit 实现即服务器主线程)上派发。

B

build() - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 
builder(CommandHelpStyle.Preset) - Static method in class me.kzheart.klib.command.api.CommandHelpStyle
 

C

cancel() - Method in interface me.kzheart.klib.scheduler.TaskHandle
 
CLASSIC - Enum constant in enum class me.kzheart.klib.command.api.CommandHelpStyle.Preset
 
clearLines() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
clearLines(int) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 
close() - Method in interface me.kzheart.klib.scope.Scope
释放作用域及其子作用域。已关闭的作用域再次调用无副作用;但在关闭或重建尚未完成时调用会抛出 IllegalStateException,例如在自身释放回调里再次关闭同一作用域。
command(String, Consumer<? super CommandSpec>) - Method in interface me.kzheart.klib.scope.Scope
 
CommandArgument<T> - Interface in me.kzheart.klib.command.api
命令参数的类型化键:既描述命令树上的一个参数节点,也用于从 CommandContext 读取解析结果。
CommandCapability - Interface in me.kzheart.klib.command.api
 
commandColor() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
commandColor(int) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 
CommandContext - Interface in me.kzheart.klib.command.api
一次命令执行的解析结果。
CommandErrorHandler - Interface in me.kzheart.klib.command.api
业务命令异常反馈。Klib 已记录异常,处理器自行决定提示、关闭界面或不发送消息。
CommandHandler - Interface in me.kzheart.klib.command.api
 
CommandHelpStyle - Class in me.kzheart.klib.command.api
Java 平台返回契约;模板、校验和快照由 Kotlin 值对象实现。 旧 Kotlin 调用 if (style.header() != null) style.header().length 依赖平台类型;CLASSIC 仍可返回 null。
CommandHelpStyle.Builder - Class in me.kzheart.klib.command.api
 
CommandHelpStyle.Preset - Enum Class in me.kzheart.klib.command.api
 
CommandRegistration - Interface in me.kzheart.klib.command.api
 
commands() - Method in class me.kzheart.klib.KPlugin
 
CommandSpec - Interface in me.kzheart.klib.command.api
 
COMPACT - Enum constant in enum class me.kzheart.klib.command.api.CommandHelpStyle.Preset
 
components() - Method in class me.kzheart.klib.KPlugin
 
config(Class<T>, String) - Method in interface me.kzheart.klib.scope.Scope
 
ConfigCapability - Interface in me.kzheart.klib.scope.capability
 
ConfigDocument<T> - Interface in me.kzheart.klib.config.api
 
ConfigFile - Annotation Interface in me.kzheart.klib.config.annotation
 
configs() - Method in class me.kzheart.klib.KPlugin
 
context() - Method in class me.kzheart.klib.KPlugin
 

D

Declarations - Class in me.kzheart.klib.reflect
公开反射入口;Java 声明保留既有平台返回类型,算法由 Kotlin 实现。
description() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
description(String) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 
description(String) - Method in interface me.kzheart.klib.command.api.CommandSpec
 
diagnosticName() - Method in interface me.kzheart.klib.diagnostic.DiagnosticSource
稳定的组件名称,用作一次 Incident 中的快照分组。
diagnosticSnapshot() - Method in interface me.kzheart.klib.diagnostic.DiagnosticSource
返回当前内存状态;调用方会复制并施加条目数与字节预算。
DiagnosticSource - Interface in me.kzheart.klib.diagnostic
提供组件当前的轻量内存诊断快照。
dispose() - Method in interface me.kzheart.klib.scheduler.TaskHandle
 
dispose() - Method in interface me.kzheart.klib.scope.Scope
等价于 Scope.close(),使作用域可以作为父作用域的一项 Disposable 资源被释放。

E

ELEGANT - Enum constant in enum class me.kzheart.klib.command.api.CommandHelpStyle.Preset
 
entry() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
entry(String) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 
errorHandler(CommandErrorHandler) - Method in interface me.kzheart.klib.command.api.CommandSpec
为当前节点及其子节点选择异常反馈;子节点可覆盖。未配置时继承模块策略。
events() - Method in class me.kzheart.klib.KPlugin
 
every(Ticks, Runnable) - Method in interface me.kzheart.klib.scheduler.KScheduler
 
every(Ticks, Runnable) - Method in interface me.kzheart.klib.scope.Scope
 
Every - Annotation Interface in me.kzheart.klib.scheduler
 
execute(CommandContext) - Method in interface me.kzheart.klib.command.api.CommandHandler
 
executes(CommandHandler) - Method in interface me.kzheart.klib.command.api.CommandSpec
 

F

find(String) - Method in interface me.kzheart.klib.command.api.CommandContext
按参数名查找本次解析路径上的值。同名参数出现在同一路径的多个层级时,返回最深处的值。
findCapability(Class<T>) - Method in interface me.kzheart.klib.scope.Scope
自当前作用域向父作用域逐级查找能力,未找到时返回空。
footer() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
footer(String) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 
forScope(Scope) - Method in interface me.kzheart.klib.scheduler.SchedulerFactory
 

G

get(String, Class<T>) - Method in interface me.kzheart.klib.command.api.CommandContext
按参数名读取本次解析路径上的值并转换为期望类型。
get(CommandArgument<T>) - Method in interface me.kzheart.klib.command.api.CommandContext
 
group() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
group(String) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 

H

handle(CommandContext, Throwable) - Method in interface me.kzheart.klib.command.api.CommandErrorHandler
 
header() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
header(String) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 
helpStyle(Supplier<CommandHelpStyle>) - Method in interface me.kzheart.klib.command.api.CommandSpec
允许配置重载替换样式;不重建命令树。提供器在主线程读取。
helpStyle(CommandHelpStyle) - Method in interface me.kzheart.klib.command.api.CommandSpec
 
hover() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
hover(String) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 

I

install(T) - Method in interface me.kzheart.klib.scope.Scope
 
instance() - Static method in class me.kzheart.klib.KPlugin
 
invalid(Method, String) - Static method in class me.kzheart.klib.reflect.Declarations
 
invoke(Object, Method, Object...) - Static method in class me.kzheart.klib.reflect.Declarations
 
isCancelled() - Method in interface me.kzheart.klib.scheduler.TaskHandle
 
isClosed() - Method in interface me.kzheart.klib.scope.Scope
 
isDone() - Method in interface me.kzheart.klib.scheduler.TaskHandle
 
isFailed() - Method in interface me.kzheart.klib.scheduler.AsyncTask
返回提供器是否因异常而终止。失败的任务也会让 isDone() 返回 true。

K

KPlugin - Class in me.kzheart.klib
Java extension boundary: the non-final static instance() method remains hideable by existing Java plugin subclasses.
KPlugin() - Constructor for class me.kzheart.klib.KPlugin
 
KScheduler - Interface in me.kzheart.klib.scheduler
 

L

label() - Method in interface me.kzheart.klib.command.api.CommandContext
 
literal(String, Consumer<? super CommandSpec>) - Method in interface me.kzheart.klib.command.api.CommandSpec
 
literalColor() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
literalColor(int) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 
load(Scope, Class<T>, String) - Method in interface me.kzheart.klib.scope.capability.ConfigCapability
 
logger() - Method in class me.kzheart.klib.KPlugin
 

M

me.kzheart.klib - package me.kzheart.klib
 
me.kzheart.klib.command.api - package me.kzheart.klib.command.api
 
me.kzheart.klib.component - package me.kzheart.klib.component
 
me.kzheart.klib.config.annotation - package me.kzheart.klib.config.annotation
 
me.kzheart.klib.config.api - package me.kzheart.klib.config.api
 
me.kzheart.klib.diagnostic - package me.kzheart.klib.diagnostic
 
me.kzheart.klib.reflect - package me.kzheart.klib.reflect
 
me.kzheart.klib.scheduler - package me.kzheart.klib.scheduler
 
me.kzheart.klib.scope - package me.kzheart.klib.scope
基于作用域管理 klib 资源的生命周期归属。
me.kzheart.klib.scope.capability - package me.kzheart.klib.scope.capability
 
methods(Class<?>) - Static method in class me.kzheart.klib.reflect.Declarations
 

N

name() - Method in interface me.kzheart.klib.command.api.CommandArgument
 
name() - Method in interface me.kzheart.klib.command.api.CommandRegistration
 
name() - Method in interface me.kzheart.klib.scope.Scope
 
next() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
next(String) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 

O

on(Class<E>, Consumer<? super E>) - Method in interface me.kzheart.klib.scope.Scope
 
on(Class<E>, EventPriority, boolean, Consumer<? super E>) - Method in interface me.kzheart.klib.scope.Scope
 
onChange(Runnable) - Method in interface me.kzheart.klib.config.api.ConfigDocument
 
onDisable() - Method in class me.kzheart.klib.KPlugin
 
onEnable() - Method in class me.kzheart.klib.KPlugin
 
onError(Consumer<? super Throwable>) - Method in interface me.kzheart.klib.scheduler.AsyncTask
注册一个在同步执行器上接收失败信息的回调。 即使任务已经失败,之后注册的回调仍会执行。 任务正常完成或取消时不调用该回调。
OnStart - Annotation Interface in me.kzheart.klib.component
 
OnStop - Annotation Interface in me.kzheart.klib.component
 

P

pageSize() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
pageSize(int) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 
PANEL - Enum constant in enum class me.kzheart.klib.command.api.CommandHelpStyle.Preset
 
permission(String) - Method in interface me.kzheart.klib.command.api.CommandSpec
 
playerOnly() - Method in interface me.kzheart.klib.command.api.CommandSpec
 
preset(CommandHelpStyle.Preset) - Static method in class me.kzheart.klib.command.api.CommandHelpStyle
 
previous() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
previous(String) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 

R

rebuild() - Method in class me.kzheart.klib.KPlugin
 
rebuild() - Method in interface me.kzheart.klib.scope.Scope
逆序释放当前资源,再重新执行创建根作用域时的初始化逻辑。整个过程在生命周期锁内串行执行, 因此重建期间其他线程的注册与查找操作会等待。
register(Scope, String, Consumer<? super CommandSpec>) - Method in interface me.kzheart.klib.command.api.CommandCapability
 
registerAnnotated(Scope, Object...) - Method in interface me.kzheart.klib.command.api.CommandCapability
 
registerCapability(Class<T>, T) - Method in interface me.kzheart.klib.scope.Scope
在当前作用域注册一项能力。同一作用域内同一类型只能注册一次,重复注册抛出 IllegalStateException;子作用域可以注册同类型能力以遮蔽父作用域的实现。
reload() - Method in interface me.kzheart.klib.config.api.ConfigDocument
 
reloadAsync() - Method in interface me.kzheart.klib.config.api.ConfigDocument
重新加载配置,并在已注册的变更监听器全部执行完毕后完成。
remove(Disposable) - Method in interface me.kzheart.klib.scope.Scope
分离先前安装的资源,但不释放它,从而避免已终止的资源在长生命周期作用域中累积。 当资源不存在或作用域生命周期正在变化时不执行任何操作。
requireCapability(Class<T>) - Method in interface me.kzheart.klib.scope.Scope
与 Scope.findCapability(java.lang.Class<T>) 相同的查找规则,但未找到时抛出 IllegalStateException。 该异常表示对应模块尚未安装到本作用域或其任一父作用域。
rootScope() - Method in class me.kzheart.klib.KPlugin
 
route(String) - Method in interface me.kzheart.klib.command.api.CommandSpec
Descend through a space-separated literal path; existing literal nodes are reused.

S

SchedulerFactory - Interface in me.kzheart.klib.scheduler
 
scope(String, Consumer<? super Scope>) - Method in interface me.kzheart.klib.scope.Scope
 
Scope - Interface in me.kzheart.klib.scope
持有资源,并按注册顺序的逆序释放资源。
sender() - Method in interface me.kzheart.klib.command.api.CommandContext
 
setup() - Method in class me.kzheart.klib.KPlugin
 
setup(Scope) - Method in class me.kzheart.klib.KPlugin
 
sourceName() - Method in interface me.kzheart.klib.config.api.ConfigDocument
 
submitSync(CompletionStage<S>, Function<? super S, ? extends T>) - Method in interface me.kzheart.klib.scope.Scope
等待源阶段后在主线程转换结果;等待与排队均绑定调用时的作用域构建代。 关闭或重建取消返回的结果,但不会取消或回滚外部源阶段的工作。 源阶段失败时不执行 action。取消/失败及后续非 Async 回调不保证在主线程发生。
submitSync(Supplier<T>) - Method in interface me.kzheart.klib.scope.Scope
提交到主线程并返回结果。关闭或重建会取消尚未完成的结果,不中断已开始的工作。 提交拒绝与业务异常会使结果异常完成;需要 ScopeImpl 支持的作用域。
sync(Runnable) - Method in interface me.kzheart.klib.scheduler.KScheduler
把任务投递到同步执行器(Bukkit 实现即服务器主线程)执行,可从任意线程调用。 任务不会立即运行,最早在下一 tick 执行;返回的句柄随作用域关闭一起取消。
sync(Runnable) - Method in interface me.kzheart.klib.scope.Scope
把任务投递到服务器主线程执行,可从任意线程调用。 用于在异步回调(包括 JDK CompletionStage 的回调)中安全访问 Bukkit API。
syncExecutor() - Method in interface me.kzheart.klib.scheduler.KScheduler
返回把命令投递到同步执行器的 Executor。内置后端拒绝关闭后提交的命令, 并取消已经排队的命令。Executor 无法保证这些命令内部的派生 Future 得到终结; 需要终态保证时使用 Scope.submitSync 或 AsyncTasks。
syncExecutor() - Method in interface me.kzheart.klib.scope.Scope
返回投递到主线程的 Executor。内置后端在关闭后拒绝提交,已排队任务随作用域取消。 Executor 无法终结被取消的 opaque Runnable 所拥有的派生阶段;需要结果终态时 使用 submitSync 或 AsyncTasks,而不是 JDK Async 组合子加本执行器。

T

TaskHandle - Interface in me.kzheart.klib.scheduler
 
tasks() - Method in class me.kzheart.klib.KPlugin
 
thenSync(Consumer<? super T>) - Method in interface me.kzheart.klib.scheduler.AsyncTask
注册一个在同步执行器上接收结果的回调。 任务失败或取消时不调用该回调。
thread() - Element in annotation interface me.kzheart.klib.scheduler.Every
 
ticks() - Element in annotation interface me.kzheart.klib.scheduler.Every
 
toBuilder() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 

U

usage() - Method in class me.kzheart.klib.command.api.CommandHelpStyle
 
usage(String) - Method in class me.kzheart.klib.command.api.CommandHelpStyle.Builder
 

V

value() - Element in annotation interface me.kzheart.klib.config.annotation.ConfigFile
 
value() - Method in interface me.kzheart.klib.config.api.ConfigDocument
 
valueOf(String) - Static method in enum class me.kzheart.klib.command.api.CommandHelpStyle.Preset
Returns the enum constant of this class with the specified name.
values() - Static method in enum class me.kzheart.klib.command.api.CommandHelpStyle.Preset
Returns an array containing the constants of this enum class, in the order they are declared.
voidMethod(Method, int) - Static method in class me.kzheart.klib.reflect.Declarations
 
A B C D E F G H I K L M N O P R S T U V 
All Classes and Interfaces|All Packages