Class MethodArgumentParser<C,T>
java.lang.Object
cloud.commandframework.annotations.parsers.MethodArgumentParser<C,T>
- Type Parameters:
C- Command sender typeT- Argument type
- All Implemented Interfaces:
cloud.commandframework.arguments.parser.ArgumentParser<C,T>
public final class MethodArgumentParser<C,T>
extends Object
implements cloud.commandframework.arguments.parser.ArgumentParser<C,T>
Represents a method annotated with
Parser- Since:
- 1.3.0
-
Field Summary
Fields inherited from interface cloud.commandframework.arguments.parser.ArgumentParser
DEFAULT_ARGUMENT_COUNT -
Constructor Summary
ConstructorsConstructorDescriptionMethodArgumentParser(@NonNull BiFunction<cloud.commandframework.context.CommandContext<C>, String, List<String>> suggestionProvider, @NonNull Object instance, @NonNull Method method) Create a new parser -
Method Summary
Modifier and TypeMethodDescription@NonNull cloud.commandframework.arguments.parser.ArgumentParseResult<@NonNull T>parse(@NonNull cloud.commandframework.context.CommandContext<@NonNull C> commandContext, @NonNull Queue<@NonNull String> inputQueue) suggestions(@NonNull cloud.commandframework.context.CommandContext<C> commandContext, @NonNull String input) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cloud.commandframework.arguments.parser.ArgumentParser
getRequestedArgumentCount, isContextFree, map
-
Constructor Details
-
MethodArgumentParser
public MethodArgumentParser(@NonNull BiFunction<cloud.commandframework.context.CommandContext<C>, String, throws ExceptionList<String>> suggestionProvider, @NonNull Object instance, @NonNull Method method) Create a new parser- Parameters:
suggestionProvider- Suggestion providerinstance- Instance that owns the methodmethod- The annotated method- Throws:
Exception- If the method lookup fails
-
-
Method Details
-
parse
-
suggestions
-