public class EnumArgument extends java.lang.Object implements ArgumentProvider<java.lang.Enum>
| Constructor and Description |
|---|
EnumArgument() |
| Modifier and Type | Method and Description |
|---|---|
@Nullable java.lang.String |
defaultArgName(@NotNull java.lang.reflect.AnnotatedElement element)
Provides a default argument name for this provider.
|
@Nullable java.lang.Enum |
provide(@NotNull Context ctx,
@NotNull InputArgument arg)
Converts the given
InputArgument into the specific type. |
void |
suggest(@NotNull Context ctx,
@NotNull InputArgument arg,
@NotNull SuggestionsBuilder suggestions)
Suggests possible completions for the given
InputArgument. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitalwaysParseQuotes, handlesNullInputArguments, suggestRich@Nullable
public @Nullable java.lang.Enum provide(@NotNull
@NotNull Context ctx,
@NotNull
@NotNull InputArgument arg)
throws BladeParseError
ArgumentProviderInputArgument into the specific type.provide in interface ArgumentProvider<java.lang.Enum>ctx - the command contextarg - the input argumentBladeParseError - if an error occurs during conversion (use BladeParseError.fatal(String) or BladeParseError.recoverable(String).)public void suggest(@NotNull
@NotNull Context ctx,
@NotNull
@NotNull InputArgument arg,
@NotNull
@NotNull SuggestionsBuilder suggestions)
throws BladeParseError
ArgumentProviderInputArgument.suggest in interface ArgumentProvider<java.lang.Enum>ctx - the command contextarg - the input argumentsuggestions - the suggestions builderBladeParseError - if an error occurs during suggestion generation (use BladeParseError.fatal(String) or BladeParseError.recoverable(String).)@Nullable
public @Nullable java.lang.String defaultArgName(@NotNull
@NotNull java.lang.reflect.AnnotatedElement element)
ArgumentProviderdefaultArgName in interface ArgumentProvider<java.lang.Enum>element - the annotated element (parameter)Name