public enum Command extends Enum<Command>
| 限定符和类型 | 类和说明 |
|---|---|
static class |
Command.ChildCommand |
| 限定符和类型 | 方法和说明 |
|---|---|
Command.ChildCommand[] |
children() |
String |
description() |
CommandHandler |
handler() |
static Command |
parse(String name) |
Command.ChildCommand |
parseChild(String childName) |
static Command |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static Command[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final Command AUTH
public static final Command HELP
public static final Command STACK
public static final Command MEMORY_USAGE
public static final Command LS
public static final Command METRICS
public static final Command REGISTRY
public static final Command QUIT
public static Command[] values()
for (Command c : Command.values()) System.out.println(c);
public static Command valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public String description()
public CommandHandler handler()
public Command.ChildCommand[] children()
public Command.ChildCommand parseChild(String childName)
Copyright © 2018. All rights reserved.