public class ResolvedCommand
extends java.lang.Object
| Constructor and Description |
|---|
ResolvedCommand(boolean isStub,
@Nullable java.lang.String matchedLabel,
@Nullable CommandTreeNode treeNode,
@NotNull java.util.List<ResolvedCommand> subcommands) |
| Modifier and Type | Method and Description |
|---|---|
void |
collectCommandsInto(@NotNull java.util.List<BladeCommand> into)
Collects all commands from this node and its subcommands into the provided list.
|
@Nullable BladeCommand |
command()
Returns the matched command, or
null if no command was matched. |
boolean |
isStub() |
static @NotNull ResolvedCommand |
match(@NotNull java.lang.String label,
@NotNull CommandTreeNode treeNode) |
java.lang.String |
matchedLabel() |
@NotNull java.lang.String |
matchedLabelOr(@NotNull java.lang.String defaultValue)
Returns the matched label, or the provided default value if no label was matched.
|
static @NotNull ResolvedCommand |
stub(@NotNull java.util.List<ResolvedCommand> subcommands) |
java.util.List<ResolvedCommand> |
subcommands() |
java.lang.String |
toString() |
CommandTreeNode |
treeNode() |
public ResolvedCommand(boolean isStub,
@Nullable
@Nullable java.lang.String matchedLabel,
@Nullable
@Nullable CommandTreeNode treeNode,
@NotNull
@NotNull java.util.List<ResolvedCommand> subcommands)
@NotNull public static @NotNull ResolvedCommand match(@NotNull @NotNull java.lang.String label, @NotNull @NotNull CommandTreeNode treeNode)
@NotNull public static @NotNull ResolvedCommand stub(@NotNull @NotNull java.util.List<ResolvedCommand> subcommands)
@Nullable public @Nullable BladeCommand command()
null if no command was matched.null.@NotNull
public @NotNull java.lang.String matchedLabelOr(@NotNull
@NotNull java.lang.String defaultValue)
defaultValue - The default value to return if no label was matched.@ApiStatus.Internal
public void collectCommandsInto(@NotNull
@NotNull java.util.List<BladeCommand> into)
into - The list to collect commands into.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isStub()
public java.lang.String matchedLabel()
public CommandTreeNode treeNode()
public java.util.List<ResolvedCommand> subcommands()